SchizoDuckie / DuckieTV

A web application built with AngularJS to track your favorite tv-shows with semi-automagic torrent integration
http://schizoduckie.github.io/DuckieTV/
Other
1.12k stars 277 forks source link

[req] support +/- adjustments to date in SceneNameResolver #1407

Closed ilike2burnthing closed 5 months ago

ilike2burnthing commented 5 months ago

Ah, annoying. Any way to do something like YYYY MM DD-1 (as in minus 1)?

Episodes air at half past midnight. The first episode came out at 2024 01 17 12:30am, so Duckie searches for After Midnight 2024 2024 01 17, but the release for that episode is titled After.Midnight.2024.2024.01.16.....

Should probably support + or -, and be a bit more distinct than the above example, e.g. YYYY MM DD[-1]. Can't see the year or month ever needing modified like that.

garfield69 commented 5 months ago

https://github.com/DuckieTV/Nightlies/releases/tag/nightly-202401201038

ilike2burnthing commented 5 months ago

Ta, working.

I realise I'm a bit late thinking of this now, but is this able to account for crossing months, e.g. -1 on the 1st Feb would be the 31st Jan and not the 0th Feb, and +1 on the 31st Jan would be the 1st Feb and not the 32nd Jan?

garfield69 commented 5 months ago

Should do. I'm not manipulating the daynumber directly, but added a moment.js call to the existing moment chain, to either subtract or add days to the broadcast date. https://github.com/SchizoDuckie/DuckieTV/blob/fc5ac68d17a5a075eaed00b5af939d363478a0ab/js/services/SceneNameResolver.js#L54-L81