diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-03-30 06:02:41 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-03-30 06:08:22 +0200 |
commit | 62fec3b2fffd12949da6fe057ce08d5bab2b7db5 (patch) | |
tree | aa649497a9e71a9503060a5d0c9ac6f634d9a871 /youtube_dl/__init__.py | |
parent | e79162558eca2e53a0cd5252102945bed7041601 (diff) |
Add new --encoding option (Fixes #2650)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 6e00806e6..4d3d6caed 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -263,6 +263,9 @@ def parseOpts(overrideArguments=None): '--ignore-config', action='store_true', help='Do not read configuration files. When given in the global configuration file /etc/youtube-dl.conf: do not read the user configuration in ~/.config/youtube-dl.conf (%APPDATA%/youtube-dl/config.txt on Windows)') + general.add_option( + '--encoding', dest='encoding', metavar='ENCODING', + help='Force the specified encoding (experimental)') selection.add_option( '--playlist-start', @@ -540,8 +543,6 @@ def parseOpts(overrideArguments=None): write_string(u'[debug] System config: ' + repr(_hide_login_info(systemConf)) + '\n') write_string(u'[debug] User config: ' + repr(_hide_login_info(userConf)) + '\n') write_string(u'[debug] Command-line args: ' + repr(_hide_login_info(commandLineConf)) + '\n') - write_string(u'[debug] Encodings: locale %r, fs %r, out %r, pref: %r\n' % - (locale.getpreferredencoding(), sys.getfilesystemencoding(), sys.stdout.encoding, preferredencoding())) return parser, opts, args @@ -786,6 +787,7 @@ def _real_main(argv=None): 'include_ads': opts.include_ads, 'default_search': opts.default_search, 'youtube_include_dash_manifest': opts.youtube_include_dash_manifest, + 'encoding': opts.encoding, } with YoutubeDL(ydl_opts) as ydl: |