]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[niconico] Simplify format info
authorSergey M․ <dstftw@gmail.com>
Sun, 14 Jun 2015 21:43:33 +0000 (03:43 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 14 Jun 2015 21:43:33 +0000 (03:43 +0600)
youtube_dl/extractor/niconico.py

index e10348004bd266d0b5764c2d644ac8d5dd73da00..0f8aa5adad5b2247621ce00249f3bd03a33a104a 100644 (file)
@@ -182,12 +182,6 @@ class NiconicoIE(InfoExtractor):
         extension = xpath_text(video_info, './/movie_type')
         if not extension:
             extension = determine_ext(video_real_url)
-        video_format = extension.upper()
-
-        if video_real_url.endswith('low'):
-            format_note = 'low'
-        else:
-            format_note = 'src'
 
         thumbnail = (
             xpath_text(video_info, './/thumbnail_url') or
@@ -246,8 +240,7 @@ class NiconicoIE(InfoExtractor):
             'url': video_real_url,
             'title': title,
             'ext': extension,
-            'format': video_format,
-            'format_note' : format_note,
+            'format_id': 'economy' if video_real_url.endswith('low') else 'normal',
             'thumbnail': thumbnail,
             'description': description,
             'uploader': uploader,