[dramafever] Extract episode
authorSergey M․ <dstftw@gmail.com>
Mon, 4 Jan 2016 19:28:48 +0000 (01:28 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 4 Jan 2016 19:28:48 +0000 (01:28 +0600)
youtube_dl/extractor/dramafever.py

index 8d71d67695fced172a0ee300d2b952e875423de4..a14021a9e3af9745f0960d5b9f4c3d80f1f59525 100644 (file)
@@ -115,7 +115,12 @@ class DramaFeverIE(DramaFeverBaseIE):
                                 'ext': 'srt',
                                 'url': subfile,
                             })
-                        info['episode_number'] = int_or_none(v.get('number'))
+                        episode_number = int_or_none(v.get('number'))
+                        episode_fallback = 'Episode'
+                        if episode_number:
+                            episode_fallback += ' %d' % episode_number
+                        info['episode'] = v.get('title', episode_fallback)
+                        info['episode_number'] = episode_number
                         break
 
         return info