瀏覽代碼

Default to continuedl=True

We already do this in the CLI interface, so it should be just fine.
Philipp Hagemeister 10 年之前
父節點
當前提交
c59e701e35
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      youtube_dl/downloader/common.py
  2. 1 1
      youtube_dl/downloader/http.py
  3. 1 1
      youtube_dl/downloader/rtmp.py

+ 1 - 1
youtube_dl/downloader/common.py

@@ -318,7 +318,7 @@ class FileDownloader(object):
         )
 
         continuedl_and_exists = (
-            self.params.get('continuedl', False) and
+            self.params.get('continuedl', True) and
             os.path.isfile(encodeFilename(filename)) and
             not self.params.get('nopart', False)
         )

+ 1 - 1
youtube_dl/downloader/http.py

@@ -49,7 +49,7 @@ class HttpFD(FileDownloader):
 
         open_mode = 'wb'
         if resume_len != 0:
-            if self.params.get('continuedl', False):
+            if self.params.get('continuedl', True):
                 self.report_resuming_byte(resume_len)
                 request.add_header('Range', 'bytes=%d-' % resume_len)
                 open_mode = 'ab'

+ 1 - 1
youtube_dl/downloader/rtmp.py

@@ -105,7 +105,7 @@ class RtmpFD(FileDownloader):
         protocol = info_dict.get('rtmp_protocol', None)
         real_time = info_dict.get('rtmp_real_time', False)
         no_resume = info_dict.get('no_resume', False)
-        continue_dl = info_dict.get('continuedl', False)
+        continue_dl = info_dict.get('continuedl', True)
 
         self.report_destination(filename)
         tmpfilename = self.temp_name(filename)