A single-page local web app to list local files of TV episodes, keep track of which episode you're on, and open the files in MPC-HC (my favourite video player).
- Scans all files in the user-supplied TV directory on request
- Retrieves show & episode information from TVDB
- No internet connection required (except if you want TVDB data)
- Has simple keyboard navigation and pleasing aesthetics
- Gracefully handles moved/missing files, added episodes, and some basic errors
Makes you use IE, which feels kinda retro maybeNow works in good browsers!
I really like MPC-HC, and all I wanted was a simple tool to easily open the next episode of a show. Those other programs do way more than I need, and they don't seem to play well with MPC. If there's other software out there that does what tvexec
does, I'd be glad to hear about it!
Windows(tested on Windows only - may require tinkering on another OS)Internet Explorer 11A good modern browser (e.g. Firefox)- Media Player Classic Home Cinema
- a local dev server (like xampp) with PHP and MySQL support
- a TVDB API key (see "Getting a TVDB API Key" below)
-
Create or choose a designated TV directory somewhere on your hard drive. Remove all non-TV files from it, and create one folder in it for every show (using the name of the show). Add the episode files into each one (the organization of sub-directories and files inside each show folder is irrelevant). ("The" in show titles is optional.)
Note: if you have more than ~10 shows or if any shows have a lot of files, you may want to start with just a part of your TV library and add more files in stages later on.
Example:
C:\some\path
> TV
> Game of Thrones
> [some files & folders]
> Lost
> [more files & folders]
> Sopranos
> [even more files & folders]
-
For each show, download a banner and save it as [folder_name].jpg in
tvexec\img\banners\
. (I use the "legacy banners" from TVDB.) -
Create a MySQL database for
tvexec
. Also create a user with global privileges for this database. (Take note of the username and password for the next step.) -
Open
tvexec\includes\auth.php
in a text editor and add your own info to the four variables at the top of the file. Also add the database name in the db variables, plus the username and password you created in step 3. -
Open
tvexec
in an internet browser. -
Click the "Scan Directory" button and wait. Note: This can take a very very long time. If you get an error, you may need to click the button again, or reload the page and try again.
-
When prompted, select the correct TVDB show links (or enter one manually) and enter any missing episode information.
Here are the (current) steps to getting an API key:
- Create an account here if you don't already have one
- Log out
- Log back in
- Go to https://www.thetvdb.com/member/api and click "Generate API Key"
- Donate to them because it's a great site
- Watch an episode by clicking the show.
- When it's done, navigate to the next episode on the
tvexec
page by pressing the right-arrow key. - You can remove a show from the page by simply deleting its episode files (or moving them out of your TV folder).
Mouse Click | Keyboard | Action |
---|---|---|
n/a | Tab | Select next show |
n/a | Shift + Tab | Select previous show |
Show box | Enter / Spacebar | Play displayed episode |
⌄ or ⌃ icon | Down/up arrow key | Toggle episode list & nav controls |
|< icon | n/a | Go to first episode |
< icon | left arrow key | Previous episode |
shuffle icon | 'r' key | Random episode |
> icon | right arrow key | Next episode |
>| icon | n/a | Mark show as watched |
outside show box | Esc | Close all show drop-downs |
This can take a few minutes, which on a computer screen can feel like an hour. If it's really frozen, just reload the page and try again. (See notes after step 1 above.)
Selected the wrong TVDB show and now all that show's episodes have incorrect names (Note: try to avoid this)
- Move all episodes for that show out of the TV folder.
- Manually update the show's TVDB id (e.g. using phpMyAdmin) to either zero or the correct TVDB id.
- Click the "Scan Directory" button and click through until finished.
- Move the show's files back into the show folder.
- Do another directory scan.
In MPC, go to Options > Player and check the "Remember File position" box. (I'd also recommend changing Advanced > RecentFilesNumber to a higher number; 40 works for me.)
The scanner finds avi, mkv, mp4, mov, and wmv files. If your episodes are in a different format, you'll need to add it to tvexec\includes\auth.php
in the part that looks like this:
$videoFiletypes = ['avi','mkv','mp4','mov','wmv'];
This project is licensed under the MIT License - see the LICENSE.md file for details
- James Heinrich for getID3
- reddit user Johndoe9846 for suggesting a way to avoid ActiveX objects