diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-16 05:04:12 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-16 05:04:55 +0100 |
commit | e3946f989ea53c14fb7ae0afd29f80a74512a3a3 (patch) | |
tree | 2d497b9a173d5d738de7294af74a00ae16fc3c84 /youtube_dl/__init__.py | |
parent | 8863d0de91ee0b7f7bac28fe9b6ba27f986e656c (diff) |
Set process title to youtube-dl
This allows killing all youtube-dl processes with killall youtube-dl, and shows up nicer in some programs.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index d5c0a3643..09a99f0db 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -62,6 +62,7 @@ from .utils import ( MaxDownloadsReached, preferredencoding, SameFileError, + setproctitle, std_headers, write_string, ) @@ -471,12 +472,15 @@ def parseOpts(overrideArguments=None): return parser, opts, args + def _real_main(argv=None): # Compatibility fixes for Windows if sys.platform == 'win32': # https://github.com/rg3/youtube-dl/issues/820 codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None) + setproctitle(u'youtube-dl') + parser, opts, args = parseOpts(argv) # Set user agent |