| 
									
										
										
										
											2013-09-23 17:59:27 +02:00
										 |  |  | # Legacy file for backwards compatibility, use youtube_dl.downloader instead! | 
					
						
							|  |  |  | from .downloader import FileDownloader as RealFileDownloader | 
					
						
							|  |  |  | from .downloader import get_suitable_downloader | 
					
						
							| 
									
										
										
										
											2013-07-31 22:32:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-23 21:42:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-09-23 17:59:27 +02:00
										 |  |  | # This class reproduces the old behaviour of FileDownloader | 
					
						
							|  |  |  | class FileDownloader(RealFileDownloader): | 
					
						
							| 
									
										
										
										
											2012-11-28 02:04:46 +01:00
										 |  |  |     def _do_download(self, filename, info_dict): | 
					
						
							| 
									
										
										
										
											2013-09-23 17:59:27 +02:00
										 |  |  |         real_fd = get_suitable_downloader(info_dict)(self.ydl, self.params) | 
					
						
							| 
									
										
										
										
											2013-01-12 20:34:50 +01:00
										 |  |  |         for ph in self._progress_hooks: | 
					
						
							| 
									
										
										
										
											2013-09-23 17:59:27 +02:00
										 |  |  |             real_fd.add_progress_hook(ph) | 
					
						
							|  |  |  |         return real_fd.download(filename, info_dict) |