diff options
author | garret <garret@airmail.cc> | 2023-06-13 03:12:41 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2023-06-13 03:12:41 +0100 |
commit | 2af9c6a823b8533cd5760e97b7f237997c12300e (patch) | |
tree | 3eae11fe9df6ca79d13dc0511557369501d59854 /yt_dlp_plugins | |
parent | e55bdb7d6e00d8012be9cff859b69f7e9f19bff1 (diff) | |
download | yt-dlp-rajiko-2af9c6a823b8533cd5760e97b7f237997c12300e.tar.gz yt-dlp-rajiko-2af9c6a823b8533cd5760e97b7f237997c12300e.tar.bz2 yt-dlp-rajiko-2af9c6a823b8533cd5760e97b7f237997c12300e.zip |
add playlist id to SearchIE
Diffstat (limited to 'yt_dlp_plugins')
-rwxr-xr-x | yt_dlp_plugins/extractor/radiko.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index eadef18..1150531 100755 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -830,9 +830,17 @@ class RadikoSearchIE(_RadikoBaseIE): "time": ("start_time", {self._strip_date}) })) + key = traverse_obj(queries, ("key", 0)) + day = traverse_obj(queries, ('start_day', 0)) or "all" + region = traverse_obj(queries, ("region_id", 0)) or traverse_obj(queries, ("area_id", 0)) + status_filter = traverse_obj(queries, ("filter", 0)) or "all" + + playlist_id = join_nonempty(key, status_filter, day, region) + return { "_type": "playlist", "title": traverse_obj(queries, ("key", 0)), + "id": playlist_id, "entries": [self.url_result(f"https://radiko.jp/#!/ts/{station}/{time}", RadikoTimeFreeIE) for station, time in [ep.values() for ep in results]] # TODO: have traverse_obj return a tuple, not a dict |