aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-08-06 09:08:07 +0100
committergarret <garret@airmail.cc>2024-08-06 15:29:05 +0100
commit913269f5d469d1df3c4ae17be1f243adfa358d98 (patch)
tree5d637e06bbfe1e01a45a10bde8b9be8605b8434e
parent0768c546d04eb70e74b47f358c71ea1bab9e06db (diff)
downloadyt-dlp-rajiko-913269f5d469d1df3c4ae17be1f243adfa358d98.tar.gz
yt-dlp-rajiko-913269f5d469d1df3c4ae17be1f243adfa358d98.tar.bz2
yt-dlp-rajiko-913269f5d469d1df3c4ae17be1f243adfa358d98.zip
mobile: add _old_archive_ids for compat with web
-rw-r--r--yt_dlp_plugins/extractor/radiko_mobile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yt_dlp_plugins/extractor/radiko_mobile.py b/yt_dlp_plugins/extractor/radiko_mobile.py
index 14be03e..fc19cb4 100644
--- a/yt_dlp_plugins/extractor/radiko_mobile.py
+++ b/yt_dlp_plugins/extractor/radiko_mobile.py
@@ -34,6 +34,7 @@ class RadikoMobileEventIE(_RadikoMobileBaseIE):
"live_status": "was_live",
"ext": "m4a",
"id": "10282949",
+ "_old_archive_ids": ["INT-20240802230000"],
"title": "TOKYO MOON",
"series": "Tokyo Moon",
@@ -69,6 +70,7 @@ class RadikoMobileEventIE(_RadikoMobileBaseIE):
start = traverse_obj(program, ("startAt", "seconds"))
end = traverse_obj(program, ("endAt", "seconds"))
+ old_timestring = rtime.RadikoTime.fromtimestamp(start, tz=rtime.JST).timestring()
return {
**traverse_obj(program, {
@@ -88,6 +90,7 @@ class RadikoMobileEventIE(_RadikoMobileBaseIE):
"timestamp": start,
"release_timestamp": end,
"duration": end - start,
+ "_old_archive_ids": [join_nonempty(program.get("stationId"), old_timestring)],
}
def _real_extract(self, url):