You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
551 B

  1. # Legacy file for backwards compatibility, use youtube_dl.downloader instead!
  2. from .downloader import FileDownloader as RealFileDownloader
  3. from .downloader import get_suitable_downloader
  4. # This class reproduces the old behaviour of FileDownloader
  5. class FileDownloader(RealFileDownloader):
  6. def _do_download(self, filename, info_dict):
  7. real_fd = get_suitable_downloader(info_dict)(self.ydl, self.params)
  8. for ph in self._progress_hooks:
  9. real_fd.add_progress_hook(ph)
  10. return real_fd.download(filename, info_dict)