Read the first post: Tracking TV Shows
After a couple days of work, the script is finally usable. There are a lot of changes from my original plan. A major one is that I ended up not using TVRage's yesterday, today, tomorrow feeds. Instead, I am keeping a list of show IDs in a SQLite database and loading all the episode information for each show. This allows the script to let you know of all the unwatched episodes from the last time you ran the script.
The other major change is that I'm using a SQLite database now instead of my original plan to just keep track of last-watched episode in a config file. A much better solution since I'm storing a lot more data.
It's still a command line app, but I think it works fairly well for what it does. Here's a rundown of all the commands:
Command Description h Display this help message l Display the list of unwatched episodes ls Display your shows fr Force an update for all of your shows q Quit oX Open stream links for this episode X is the episode ID from the unwatched episode list (command: l) wX Mark episode as watched. X is the episode ID from the unwatched episode list (command: l) wallX Mark episode and all previous episodes in the series as watched. X is the episode ID from the unwatched episode list (command: l) sZ Search the TVRage database for a series by name Z is the name of the series (ex: sParks and Recreation) aX Add a series to keep track of in your database X is the TVRage ID for the series. Use s command to search. dX Delete a series from your database X is the TVRage ID for the series. Use ls command to list your shows
Comments on a few commands:
frcommand to force a refresh.
wallcommand allows you to quickly mark everything you've already seen as watched.
The app works fairly well except for the TVRage queries timing out sometimes. It handles it gracefully by displaying an error message but it's still annoying. I increased the timeout to 10 seconds but that doesn't seem to help a lot. I feel like they may be throttling my access due to excessive usage because after a while, it'll load instantly. Not sure, though.
Another issue is with special characters. The app doesn't handle Unicode characters like
or fancy quotes
(standard quote looks like
") and I'm still trying to figure out how to make that work.
All in all it's simple and does what I want. I just have to run the script each evening to see if there are any shows I need to watch.
It's telling me there's a new episode of The Simpsons tonight.
C:\Users\Sachleen\Desktop\TV-Shows>python tv.py Last database update was on 2014-01-12 Not refreshing database. Enter command fr to Force Refresh ID | Show | Episode | Date | Description 0 | The Simpsons | s25 e10 | 2014-01-12 | Married To The Blob Enter a command or h for help :