From bd19aa0ed32ca4d041e691d47697ad7b82454b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Tue, 5 Jan 2016 01:28:48 +0600 Subject: [PATCH] [dramafever] Extract episode --- youtube_dl/extractor/dramafever.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/dramafever.py b/youtube_dl/extractor/dramafever.py index 8d71d6769..a14021a9e 100644 --- a/youtube_dl/extractor/dramafever.py +++ b/youtube_dl/extractor/dramafever.py @@ -115,7 +115,12 @@ def _real_extract(self, url): '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