aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor/radiko_time.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp_plugins/extractor/radiko_time.py')
-rw-r--r--yt_dlp_plugins/extractor/radiko_time.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/yt_dlp_plugins/extractor/radiko_time.py b/yt_dlp_plugins/extractor/radiko_time.py
index 441085e..be7f6cd 100644
--- a/yt_dlp_plugins/extractor/radiko_time.py
+++ b/yt_dlp_plugins/extractor/radiko_time.py
@@ -20,6 +20,14 @@ class RadikoTime():
dt -= datetime.timedelta(days=1)
return dt.strftime("%Y%m%d")
+ def broadcast_day_end(self):
+ dt = self.datetime
+ if dt.hour < 5:
+ dt -= datetime.timedelta(days=1)
+ dt += datetime.timedelta(days=1)
+ dt.replace(hour=5, minute=0, second=0)
+ return dt
+
def timestamp(self):
return self.datetime.timestamp()
def isoformat(self):