[ ------------ 95% ---------- ]
Status: In Progress
March 01, 2011:
I have gathered a significant collection of movies over the last few years, and now it has become an arduous task to remember anything about certain movies. I usually sit down wanting to watch *something*, often prioritizing the movies that 1) I haven’t seen, and 2) fit into some number of genres that I’m in the mood to watch. I end up scratching my head at the titles and searching through IMDB to find something that might fit my requirements, but this process ends up taking as long as it takes for my dinner to get cold.
As luck would have it, the project for the Database class I am taking this quarter involves creating a schema, queries, and Java-based CLI application to store/maintain a movie company’s database. It’s not exactly what I have in mind for my own project, but it’s definitely a good starting point.
The features I want are:
- Filtering by genre, title, main actors, IMDB rating
- Recording of the last time the movie was watched (or possibly a longer history) – manual timestamp insertion at first, then later automatic
- Potential to recommend movies by genre, or actor and IMDB rating
- Create links to video files if they exist on the computer, and also to the movie’s IMDB page
I’ll be able to run this off a dedicated mini home server which is already running IIS for serving webpages, so a web-based app will come first before a dedicated program. (Note in hindsight: This turns out to be completely false. I end up going with a Java implementation to refresh my dusty Java skills and also to learn/re-learn how to make GUIs)
Obviously data-insertion will be a big task, so part of this project will be to create a separate application/script that inputs a list of movie titles, grabs data from IMDB, and then inserts everything into the database.
Mach 27, 2011:
Data gathering
I have been working on the first aspect of this project, and I just finished up the content-insertion into my database. The basic structure of the code is:
- Create a list of titles based on the folders I have in two directories: “Movies” and “TV Shows”. This is done with a one line Windows Batch Script that looks like this:
dir "\\BACKUPSERVER\Videos\Movies" /AD /B /ON > movies.txt
, and it outputs just the one title per line in ascending order - The next steps were coded in Java, and I first read in the movie/tv show title files so that I can construct a list of titles
- For each of these titles, I check to see if the title and media type (Movie or TV Show) already exists as a tuple in my database. If it has, then we can just ignore it, otherwise we continue
- For the titles that are not already in the database, I currently query two third party IMDB APIs (http://www.deanclatworthy.com/imdb/ and http://www.imdbapi.com/) to get more information about the title
- The first query to Dean Clatworthy’s IMDB API gets the basic information including the year of release, genres, IMDB rating, and the number of votes. The second query to Brian Fritz’s API gets the movie’s summary and poster image URL. The reason I currently make two queries is because I first wrote the code to gather data from Dean Clatworthy’s IMDB API, but later found Brian Fritz’s IMDB API which returns the same data plus more. I’ll go back to streamline it, but since all of my current movies are inserted into the DB, there would be no benefit to making the changes now as opposed to after I work on the interface side of things since I only need to make the queries when we encounter a title that is not in the database
April 03, 2011:
The project is quite functional, and I’d say mostly done at this point. There are, of course, minor things that bug me, and more changes I want to make, but it is getting close to being how I envisioned it. There are three main screens – the Home Screen, the List Screen, and the Movie Details Screen.
The Home Screen gives the user the option to select: a movie or tv show by its title, a genre, an actor, or to search by a term that will search the titles, actors, and summary fields of all movies/tv shows. The movie poster is randomly selected from the movies/tv shows in the database, and changes every 5 seconds.
The List Screen displays the results of the query/search from the Home Screen and shows most of the movies’ details. Each of the fields (aside from Genres) can be sorted on, and any of the cells that are clicked on opens the Movie Details Screen for the selected movie.
The Movie Details screen not-so-surprisingly shows all of the details about a movie. The movie poster when clicked opens up the IMDB page for the movie, the “Daniel” and “Sarah” rating stars change dynamically in an IMDB-like fashion when moused-over and do an SQL update when clicked, the Open Folder button opens a Windows Explorer folder for the folder that the movie resides in, and the Prev/Next buttons cycle through the linked list of movies that were returned in the original search/query.
April 11, 2011:
Just a few minor tweaks like adding a “Remember what episode we were watching in this series” box that only shows up for TV shows, and a Recommend button which links to www.tastekid.com and includes the title of the movie to bring up recommendations. It would be possible to use an API for one of the few recommendation sites out there, but a link is good enough for me for the time being.
The last major step from my original requirements is to record the time/datestamp when a movie was watched. I have been putting this off since I can’t think of a good way to automate this (and the OS’s built-in timestamps like Last Accessed are entirely useless) and I’m not 100% happy with having to manually set a time/date or press a button to record the current time. I need to do some more thinking on that one.
This post is under construction; check back later for more content.