garret1317 / yt-dlp-rajiko

improved radiko.jp extractor for yt-dlp
https://427738.xyz/yt-dlp-rajiko/
Other
23 stars 1 forks source link

unified time handling might be a good idea #11

Closed garret1317 closed 10 months ago

garret1317 commented 12 months ago

some of it's a bit fragmented and hacky at the moment, might be a good idea to make a big unified one that uses datetime and can handle all the formats needed

todo:specific examples (ctrl-f for "hack")

garret1317 commented 12 months ago

need:

timezone handled in:

garret1317 commented 10 months ago
  • url format: 20230607062200 - YYYYMMMDDhhmmss - 29-hour time is valid - handled in ShareIE

bit more complicated than that

on the site, seconds and minutes get clamped to 59, hours get clamped to 24 but share urls do indeed just go on forever

garret1317 commented 10 months ago

just to comment a bit on the current solution:

it's definitely not perfect, there's still some jank etc etc but its a hell of a lot better than what i had before lol

i think ideally i'd've liked to extend upon datetime.datetime, so id still get all the nice functions it has that i have to do some jank to get to but i couldn't figure out how and i just wanted to get on with it, so i have the current solution of doing passthrough for the couple of things i need that are in datetime.datetime again, not perfect, but much better than what came before

garret1317 commented 10 months ago

hm, here's a hack for handling the days in the share time take away any days above 28 (lowest month end), then add them back in the datetime

not sure if it'll work yet, just noting down so i don't forget

garret1317 commented 9 months ago

days above the end of the month dont work on the site wasnt able to check before because it wasnt quite the end of the month yet