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

No commercial fill through midnight when reset time is set for 5am #53

Closed MoeFwacky closed 6 years ago

MoeFwacky commented 7 years ago

So, I have my reset time set for 5am, and I have the xml schedules for each day run from 5am to 4:59am. This includes a show that runs from 11-11:45 and another that starts at midnight. However, commercials don't inject into the gap between 11:45 and midnight like they do elsewhere.

Here's an sample from the xml

        <time title="Star Trek&#58; Deep Space Nine" type="series" strict-time="true" time-shift="15" overlap-max="30">23:00</time>
        <time title="The Venture Bros&#46;" type="series" strict-time="true" time-shift="15" overlap-max="20">0:01</time>
justinemter commented 7 years ago

Hmm, yeah this is definitely a bug. I'm going to hold off on it and urge users to use 12:00 AM for the target reset time (if using commercials). Right now that logic is a bit complicated and I fear tampering with it might introduce other issues.

MoeFwacky commented 7 years ago

So something else that works is scheduling something short closer to midnight. I've take to tossing an episode of Robot Chicken to fill the gap which does the job for now. What I would love to do is drop an Emergency Alert System test in at 11:59, but I don't want to drop it in the movies database, in case it gets randomly selected. I don't know what the work involved with allowing commercial database items to be scheduled in the xml, but that would be ideal, though probably a project for another day.

justinemter commented 7 years ago

This is a good idea. I am experiencing an error now that I thought was previously fixed...my daily schedule for a continuously running channel will often create the new schedule on top of the old schedule (without wiping the old schedule). Very frustrating! I'm trying to fix this issue first then I'll look into adding commercial scheduling. It shouldn't be too difficult though - it's a great idea.

justinemter commented 7 years ago

What I would love to do is drop an Emergency Alert System test in at 11:59

I am going to push this to beta. It shouldn't be that hard but I always say that an most of the time it is.