mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-03 10:59:47 -05:00
Add --xattr-set-filesize option (Fixes #1348)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user