Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for setting title of Command Prompt in windows #3

Closed
rg3 opened this issue Nov 1, 2010 · 3 comments
Closed

Patch for setting title of Command Prompt in windows #3

rg3 opened this issue Nov 1, 2010 · 3 comments
Labels

Comments

@rg3
Copy link
Collaborator

rg3 commented Nov 1, 2010

Was: http://bitbucket.org/rg3/youtube-dl/issue/214/

So I have tweaked my little patch so that it doesn't do bad things on linux/mac. Note the check for the os.

def report_progress(self, percent_str, data_len_str, speed_str, eta_str):
                """Report download progress."""
                if self.params.get('noprogress', False):
                        return
                if (os.name == 'nt'):
                        os.system('title youtube-dl [%s]' % percent_str)                        
                self.to_stdout(u'\r[download] %s of %s at %s ETA %s' %
                                (percent_str, data_len_str, speed_str, eta_str), skip_eol=True)
@rg3
Copy link
Collaborator Author

rg3 commented Nov 1, 2010

Just wanted to clarify that, even if this issue has been open for a long time, I'm not against this feature. However, I'd like it to be optional (because it does not work on Linux virtual terminals, for example), to work on every platform, and not to launch a program every time the title has to be changed.

@yaplik
Copy link

yaplik commented Dec 9, 2010

setting title on linux: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

import sys
sys.stdout.write("\x1b]0;newtitle\x07")

@rg3
Copy link
Collaborator Author

rg3 commented Jan 4, 2011

Implemented by grawity and merged.

@ghost ghost mentioned this issue Aug 17, 2018
5 tasks
mrfade referenced this issue in mrfade/youtube-dl May 11, 2019
Fixed invalid control character error
tsukumijima referenced this issue in tsukumijima/youtube-dl Sep 7, 2020
joedborg referenced this issue in joedborg/youtube-dl Nov 17, 2020
Use new null part syntax for ffmpeg remote part
hinki1 pushed a commit to hinki1/youtube-dl that referenced this issue Nov 20, 2020
* Tweak the auto-update features of youtube-dl. 
* Add infrastructure to enable tests after build time.

Courtesy of @Unit193.
haimn referenced this issue in haimn/youtube-dl Nov 21, 2020
tsukumijima referenced this issue in tsukumijima/youtube-dl Dec 2, 2020
kobiburnley added a commit to kobiburnley/youtube-dl-1 that referenced this issue Jun 29, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants