From 2af9c6a823b8533cd5760e97b7f237997c12300e Mon Sep 17 00:00:00 2001 From: garret Date: Tue, 13 Jun 2023 03:12:41 +0100 Subject: add playlist id to SearchIE --- yt_dlp_plugins/extractor/radiko.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3-70-g09d2