projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[FFmpegSubtitlesConvertorPP] remove intermediate srt files
[youtube-dl]
/
youtube_dl
/
downloader
/
common.py
diff --git
a/youtube_dl/downloader/common.py
b/youtube_dl/downloader/common.py
index b8bf8daf8c3265f9baa53d3ac30ee78d1c149587..de815612ceb7b13af7305c1fc9cb1b92eccd501b 100644
(file)
--- a/
youtube_dl/downloader/common.py
+++ b/
youtube_dl/downloader/common.py
@@
-5,9
+5,9
@@
import re
import sys
import time
import sys
import time
-from ..compat import compat_str
from ..utils import (
encodeFilename,
from ..utils import (
encodeFilename,
+ error_to_compat_str,
decodeArgument,
format_bytes,
timeconvert,
decodeArgument,
format_bytes,
timeconvert,
@@
-45,6
+45,7
@@
class FileDownloader(object):
(experimental)
external_downloader_args: A list of additional command-line arguments for the
external downloader.
(experimental)
external_downloader_args: A list of additional command-line arguments for the
external downloader.
+ hls_use_mpegts: Use the mpegts container for HLS videos.
Subclasses of this one must re-define the real_download method.
"""
Subclasses of this one must re-define the real_download method.
"""
@@
-186,7
+187,7
@@
class FileDownloader(object):
return
os.rename(encodeFilename(old_filename), encodeFilename(new_filename))
except (IOError, OSError) as err:
return
os.rename(encodeFilename(old_filename), encodeFilename(new_filename))
except (IOError, OSError) as err:
- self.report_error('unable to rename file: %s' % compat_str(err))
+ self.report_error('unable to rename file: %s' %
error_to_
compat_str(err))
def try_utime(self, filename, last_modified_hdr):
"""Try to set the last-modified time of the given file."""
def try_utime(self, filename, last_modified_hdr):
"""Try to set the last-modified time of the given file."""
@@
-295,7
+296,7
@@
class FileDownloader(object):
def report_retry(self, count, retries):
"""Report retry in case of HTTP error 5xx"""
def report_retry(self, count, retries):
"""Report retry in case of HTTP error 5xx"""
- self.to_screen('[download] Got server HTTP error. Retrying (attempt %d of %
d
)...' % (count, retries))
+ self.to_screen('[download] Got server HTTP error. Retrying (attempt %d of %
.0f
)...' % (count, retries))
def report_file_already_downloaded(self, file_name):
"""Report file has already been fully downloaded."""
def report_file_already_downloaded(self, file_name):
"""Report file has already been fully downloaded."""