mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 23:57:17 +08:00
Added display of video file size information. Info will be displayed
even with --skip-download option
This commit is contained in:
parent
0c24eed73a
commit
a13a1d170f
@ -850,7 +850,6 @@ class FileDownloader(object):
|
|||||||
self.trouble(u'ERROR: Cannot write metadata to JSON file ' + infofn)
|
self.trouble(u'ERROR: Cannot write metadata to JSON file ' + infofn)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.params.get('skip_download', False):
|
|
||||||
if self.params.get('nooverwrites', False) and os.path.exists(_encodeFilename(filename)):
|
if self.params.get('nooverwrites', False) and os.path.exists(_encodeFilename(filename)):
|
||||||
success = True
|
success = True
|
||||||
else:
|
else:
|
||||||
@ -1039,6 +1038,9 @@ class FileDownloader(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
data_len = data.info().get('Content-length', None)
|
data_len = data.info().get('Content-length', None)
|
||||||
|
print '[youtube] File size: ' + data_len + ' bytes'
|
||||||
|
if self.params.get('skip_download', False):
|
||||||
|
return True;
|
||||||
if data_len is not None:
|
if data_len is not None:
|
||||||
data_len = long(data_len) + resume_len
|
data_len = long(data_len) + resume_len
|
||||||
data_len_str = self.format_bytes(data_len)
|
data_len_str = self.format_bytes(data_len)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user