And we’re back… for another Project One update!

A Re-Write of a Re-Write…

Yes, I had a spark of inspiration last weekend and re-wrote all of the code this week. Normally I would regret making this decision and get absolutely nowhere with it, but luckily, this turned out to be a fantastic use of my time. It’s also an awesome feeling that you can easily re-write each script in no time, mainly because you’ve done in many times before.

The now, “old” code, did not allow a few features and options that I really wanted, such as being able to have different schedules depending on the day of the week. For example, I can now have Monday-Thursday playing a typical “TV shows in the morning, movie in the afternoon, followed by TV shows the rest of the day”. Friday nights would be different though, playing “TV shows all day” but having a “main feature movie” every Friday night at 6PM. Saturdays can even have a double feature starting at 7PM! This gives a guess, a “retro” feel, similar to how cable TV used to do. Remember when you waited all week for a movie to air? Remember how exciting it was to finally get to a Friday or Saturday night to enjoy it? That’s the idea.

This does mean that the Channel Definition files are much larger and more complicated, but it’s worth it.

The File Watcher script still needs some cleaning up but I was able to add more media to the external hard drive and watch it grab all the metadata without a hitch.

Time and Maintenance

In the last blog post, I mentioned that the reality of this project came down to our TV viewing habits. We don’t watch a lot, so having this to play constantly for days on end was not realistic. With the new code re-write, I have more flexibility. The Scheduler now knows how to handle transitioning between days and no longer has to be set on a 4AM-4AM basis for every channel.

Also, I am now able to store each day’s schedule in a simple, readable JSON file. Each time the script is ran, playback starts instantly if a schedule is already made, or it will create one in a matter of seconds. Schedules for 5 channels (1 Comedy, 1 Random, 3 Pay-Per-View Channels) only takes roughly 45 seconds to create.

Finally, I have a dedicated “Maintenance” function that can be accessed by pressing the T key. The function currently removes schedule files older than today, creates schedules for tomorrow, and even loads them into the current queue. Yes, I can have multiple days worth of scheduling in the queue at any time now so that it can in fact run forever. This will eventually get setup with the Schedule Python module so that I can have it run every couple of hours in the background.

Portable Monitor

The new portable monitor is simply fantastic. No using NoMachine to do testing as I can now do it live. The content looks great, the speakers aren’t terrible, and I couldn’t be happier with it. This will definitely come in handy when we travel in the future.

Next Steps

I’ve still got a few things on the to-do list:

  • Create Logos and test overlay for different resolutions
  • Verify that Movie selections are being filtered by ratings (i.e. don’t play R-rated movies in the morning)
  • Manually fix ratings for existing movies as TheTVDB is missing that info
  • How can I track episodes and movies that are played per channel so we don’t see the same stuff all the time?
  • Commercial randomization - How to start playback at random points to boost variety?
  • Getting more “filler” on the external hard drive

Until next week, have a great weekend everyone!