aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
blob: 5c8e676a20bdb112452e2a8b0815422ca3bf7c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# Legacy file for backwards compatibility, use youtube_dl.downloader instead!
from .downloader import FileDownloader as RealFileDownloader
from .downloader import get_suitable_downloader


# This class reproduces the old behaviour of FileDownloader
class FileDownloader(RealFileDownloader):
    def _do_download(self, filename, info_dict):
        real_fd = get_suitable_downloader(info_dict)(self.ydl, self.params)
        for ph in self._progress_hooks:
            real_fd.add_progress_hook(ph)
        return real_fd.download(filename, info_dict)