diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-25 04:49:44 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-25 04:49:44 +0100 |
commit | 881e6a1f5c47a65348879f817ad833081e8c5ada (patch) | |
tree | b00cf8678eb48bc96815d32a58d13721151ba652 /youtube_dl/__init__.py | |
parent | baeaeffce550b23848983cd281f173a7906cd7f9 (diff) |
Add --xattr-set-filesize option (Fixes #1348)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 09da8802d..112a8ba60 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -241,6 +241,11 @@ def _real_main(argv=None): 'verboseOutput': opts.verbose, 'exec_cmd': opts.exec_cmd, }) + if opts.xattr_set_filesize: + try: + import xattr + except ImportError: + parser.error('setting filesize xattr requested but python-xattr is not available') ydl_opts = { 'usenetrc': opts.usenetrc, @@ -337,6 +342,7 @@ def _real_main(argv=None): 'external_downloader': opts.external_downloader, 'list_thumbnails': opts.list_thumbnails, 'playlist_items': opts.playlist_items, + 'xattr_set_filesize': opts.xattr_set_filesize, } with YoutubeDL(ydl_opts) as ydl: |