Explorar o código

Set the extractor key in playlists entries

If they were videos the extractor key wasn't being set anywhere else
Closes 877
Jaime Marquínez Ferrándiz %!s(int64=12) %!d(string=hai) anos
pai
achega
8027175600
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      youtube_dl/FileDownloader.py

+ 5 - 0
youtube_dl/FileDownloader.py

@@ -539,6 +539,11 @@ class FileDownloader(object):
                          'playlist': playlist, 
                          'playlist': playlist, 
                          'playlist_index': i + playliststart,
                          'playlist_index': i + playliststart,
                          }
                          }
+                if not 'extractor' in entry:
+                    # We set the extractor, if it's an url it will be set then to
+                    # the new extractor, but if it's already a video we must make
+                    # sure it's present: see issue #877
+                    entry['extractor'] = ie_result['extractor']
                 entry_result = self.process_ie_result(entry,
                 entry_result = self.process_ie_result(entry,
                                                       download=download,
                                                       download=download,
                                                       extra_info=extra)
                                                       extra_info=extra)