From 9d23a683e95709ca3e709e5dd8c29a5a091f4145 Mon Sep 17 00:00:00 2001 From: garret Date: Fri, 10 Nov 2023 19:10:24 +0000 Subject: make time classes inherit from datetime.datetime so now it's just datetime.datetime with custom input and a few new funcs instead of actually having a datetime.datetime internally and jankily kind-of-exposing it doesn't really affect things currently, but it makes something i want to do possible (and it's generally just the better way of doing it) Co-Authored-By: 9382 --- yt_dlp_plugins/extractor/radiko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yt_dlp_plugins/extractor/radiko.py') diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 0f44a7b..8ab8cad 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -778,7 +778,7 @@ class RadikoTimeFreeIE(_RadikoBaseIE): artist = traverse_obj(track, ("artist", "name")) or track.get("artist_name") chapters.append({ "title": join_nonempty(artist, track.get("title"), delim=" - "), - "start_time": (datetime.datetime.fromisoformat(track.get("displayed_start_time")) - start.datetime).total_seconds(), + "start_time": (datetime.datetime.fromisoformat(track.get("displayed_start_time")) - start).total_seconds(), }) return chapters -- cgit v1.2.3-70-g09d2