justinemter / pseudo-channel

This is a python based cli-app using the python-plex-api to control a plex-client and act like a real TV channel with show scheduling, commercial breaks, movie nights, etc. "Home-Brewed TV Channel(s) for Hackers"
GNU General Public License v3.0
130 stars 18 forks source link

Scheduled items pushed past midnight play out of order #46

Closed MoeFwacky closed 7 years ago

MoeFwacky commented 7 years ago

With channels, I've spun up a movie channel with strict-time=false on all but the first entry, spaced about two hours apart. If enough movies run over, some schedules will push the last item (scheduled at 22:30) past midnight. The problem is if a movie gets scheduled for 12:15 AM the "next day" it actually starts playback at 12:30 AM today, potentially interrupting or being interrupted by other scheduled playback (like the 12:30 strict-time movie to start the day's schedule).

justinemter commented 7 years ago

I've been noticing a lot of issues like this too. I need to rework all of that logic and make it less prone to these types of errors. Next on the list is to get <saturdays> and <sundays> - or any day of the week working correctly. I could have sworn it was but I've been having issues. Anyway, that being said, for now, just be extra careful not to overlap your days content... try to fill it up as far as you can without it leaking over into the next day. This will be high priority. :)

*edit spelling

MoeFwacky commented 7 years ago

I remember a while ago you had it set up to include the date (instead of 1900-01-01) in the scheduling, but in an update past that it reverted. I can't remember exactly what the update was that this happened with, but I think it may have been around the time you changed how media was triggered (from checking every second to sleeping for x seconds).

justinemter commented 7 years ago

*not exactly fixed but the logic I added to check to see if media was playing from the previous day before triggering the newly scheduled media for the next day.