]>
Commit | Line | Data |
---|---|---|
3bc2ddcc JMF |
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 | |
b15d4f62 | 4 | |
f2cd958c | 5 | |
3bc2ddcc JMF |
6 | # This class reproduces the old behaviour of FileDownloader |
7 | class FileDownloader(RealFileDownloader): | |
59ae15a5 | 8 | def _do_download(self, filename, info_dict): |
3bc2ddcc | 9 | real_fd = get_suitable_downloader(info_dict)(self.ydl, self.params) |
bffbd5f0 | 10 | for ph in self._progress_hooks: |
3bc2ddcc JMF |
11 | real_fd.add_progress_hook(ph) |
12 | return real_fd.download(filename, info_dict) |