aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor/radiko_time.py
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-11-01 09:10:15 +0000
committergarret <garret@airmail.cc>2024-11-01 09:10:15 +0000
commit8805fd0326aff58332c626107625e80a597b6e45 (patch)
treeb0250eb95d1ed7360ec8c40b3dbb88af0dc535be /yt_dlp_plugins/extractor/radiko_time.py
parente9655881313b9b7ca1e402a82f51bbeed8a81e04 (diff)
downloadyt-dlp-rajiko-master.tar.gz
yt-dlp-rajiko-master.tar.bz2
yt-dlp-rajiko-master.zip
more right-thinking way of handling timefree 30HEADmaster
still hardcoded to not work though
Diffstat (limited to 'yt_dlp_plugins/extractor/radiko_time.py')
-rwxr-xr-xyt_dlp_plugins/extractor/radiko_time.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/yt_dlp_plugins/extractor/radiko_time.py b/yt_dlp_plugins/extractor/radiko_time.py
index b383098..d2084aa 100755
--- a/yt_dlp_plugins/extractor/radiko_time.py
+++ b/yt_dlp_plugins/extractor/radiko_time.py
@@ -36,16 +36,11 @@ class RadikoTime(datetime.datetime):
dt = datetime.datetime(date.year, date.month, date.day, 5, 0, 0, tzinfo=JST)
return dt
- def expiry(self, tf30):
- available_days = 30 if tf30 else 7
- return self.broadcast_day_end() + datetime.timedelta(days=available_days)
- # IF SOMETHING CHANGES HERE YOU NEED TO UPDATE ↓↓earliest_available↓↓ AS WELL!
+ def expiry(self):
+ free = self.broadcast_day_end() + datetime.timedelta(days=7)
+ tf30 = self.broadcast_day_end() + datetime.timedelta(days=30)
-
-def earliest_available(tf30):
- available_days = 30 if tf30 else 7
- return (RadikoTime.now(tz=JST) - datetime.timedelta(days=available_days)).broadcast_day_start()
- # IF SOMETHING CHANGES HERE YOU NEED TO UPDATE ↑↑expiry↑↑ AS WELL!
+ return free, tf30
class RadikoSiteTime(RadikoTime):