Merge pull request #1565 from rzhxeo/rtmpdump_test
[youtube-dl] / youtube_dl / FileDownloader.py
index 706592988fbeca9902c6a61e696d54bc342bbd9f..2cda5d52a7369d008eb1edb3df15bf75fab1580b 100644 (file)
@@ -291,6 +291,8 @@ class FileDownloader(object):
             basic_args += ['--playpath', play_path]
         if tc_url is not None:
             basic_args += ['--tcUrl', url]
+        if self.params.get('test', False):
+            basic_args += ['--stop', '1']
         args = basic_args + [[], ['--resume', '--skip', '1']][self.params.get('continuedl', False)]
         if self.params.get('verbose', False):
             try:
@@ -398,6 +400,7 @@ class FileDownloader(object):
             self._hook_progress({
                 'filename': filename,
                 'status': 'finished',
+                'total_bytes': os.path.getsize(encodeFilename(filename)),
             })
             return True