tvnamer
tvnamer copied to clipboard
Req: "touch" file to "best guess" of original broadcast date/time.
Using tvdpapi, capture the firstaired (date) from the episode data, and the airs_time (time) from the series data to construct a date/time to "touch" the file after renaming/moving it.
Unfortunately, the airs_time seems to be in a multitude of formats. Just in the shows I have checked, I have seen all of the following:
10:00 PM EST 09:00 PM 10:00 pm 9:00 PM 10:00PM 9:30pm 22:00 8 PM 9 pm 9pm
Seems a bit unhelpful that airs_time
is so inconsistently formatted. Might be worth asking on thetvdb.com forums if the data should be normalised/validated? (e.g to allow for simple calculations like "how long till this episode airs", or customising the time format)
Also, what to do about timezones? Does it matter if the file is touched at the local "10PM on Jan 1st", when the episode technically aired the following day for users in a GMT+10.5 timezone? (or something, that example might be backwards)
Hm, sickbeard might be useful reference for how to do this