diff options
author | Jesús <heckyel@hyperbola.info> | 2022-12-02 05:21:10 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-12-02 05:21:10 +0800 |
commit | eaeeef9c1d1bedb76fea953c332ef84d53bffe2c (patch) | |
tree | c3cb5582247e47fc67c24cd7ff8ea857fb76821e /hypervideo_dl/extractor/funimation.py | |
parent | 1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (diff) | |
download | hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.lz hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.xz hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/funimation.py')
-rw-r--r-- | hypervideo_dl/extractor/funimation.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hypervideo_dl/extractor/funimation.py b/hypervideo_dl/extractor/funimation.py index 6aa9bc9..18363c1 100644 --- a/hypervideo_dl/extractor/funimation.py +++ b/hypervideo_dl/extractor/funimation.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import random import re import string @@ -8,17 +5,18 @@ import string from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( + ExtractorError, determine_ext, int_or_none, join_nonempty, js_to_json, + make_archive_id, orderedSet, qualities, str_or_none, traverse_obj, try_get, urlencode_postdata, - ExtractorError, ) @@ -245,11 +243,14 @@ class FunimationIE(FunimationBaseIE): 'language_preference': language_preference(lang.lower()), }) formats.extend(current_formats) + if not formats and (requested_languages or requested_versions): + self.raise_no_formats( + 'There are no video formats matching the requested languages/versions', expected=True, video_id=display_id) self._remove_duplicate_formats(formats) - self._sort_formats(formats, ('lang', 'source')) return { - 'id': initial_experience_id if only_initial_experience else episode_id, + 'id': episode_id, + '_old_archive_ids': [make_archive_id(self, initial_experience_id)], 'display_id': display_id, 'duration': duration, 'title': episode['episodeTitle'], @@ -264,6 +265,7 @@ class FunimationIE(FunimationBaseIE): 'formats': formats, 'thumbnails': thumbnails, 'subtitles': subtitles, + '_format_sort_fields': ('lang', 'source'), } def _get_subtitles(self, subtitles, experience_id, episode, display_id, format_name): |