A feature-rich command-line audio/video downloader
Merge remote-tracking branch 'jaimeMF/split-downloaders'
Philipp Hagemeister9fc3bef87a10
diff --cc youtube_dl/YoutubeDL.pyindex e705c410b6,414aa5a80c..04771c6372--- a/youtube_dl/YoutubeDL.py+++ b/youtube_dl/YoutubeDL.py@@@ -248,16 -228,19 +246,20 @@@ class YoutubeDL(object)self._pps.append(pp)pp.set_downloader(self)+ def add_downloader_progress_hook(self, ph):+ """Add the progress hook to the file downloader"""+ self._fd_progress_hooks.append(ph)+def _bidi_workaround(self, message):- if not hasattr(self, '_fribidi_channel'):+ if not hasattr(self, '_output_channel'):return message+ assert hasattr(self, '_output_process')assert type(message) == type(u'')line_count = message.count(u'\n') + 1- self._fribidi.stdin.write((message + u'\n').encode('utf-8'))- self._fribidi.stdin.flush()- res = u''.join(self._fribidi_channel.readline().decode('utf-8')+ self._output_process.stdin.write((message + u'\n').encode('utf-8'))+ self._output_process.stdin.flush()+ res = u''.join(self._output_channel.readline().decode('utf-8')for _ in range(line_count))return res[:-len(u'\n')]