aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-06-13 03:12:41 +0100
committergarret <garret@airmail.cc>2023-06-13 03:12:41 +0100
commit2af9c6a823b8533cd5760e97b7f237997c12300e (patch)
tree3eae11fe9df6ca79d13dc0511557369501d59854 /yt_dlp_plugins/extractor
parente55bdb7d6e00d8012be9cff859b69f7e9f19bff1 (diff)
downloadyt-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/extractor')
-rwxr-xr-xyt_dlp_plugins/extractor/radiko.py8
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