Show Renaming Utility - Python Script moves / renames dowloaded TV Show Episode files
#1
Thumbs Up 
Well this is my first contribution here so I hope this is okay.

This is a python script for renaming TV shows. It is designed to work with bittorent in particular. It takes a source folder and searches through all the subfolders to find all the files. It then tries to match the files with either a TV show or an anime series as defined in the config file. It will then rename and copy the show the the destination folder. If the file is still seeding in you torrent program it will leave an extra copy there. If it has finished it will delete that copy. If the file doesn't match any of the defined shows it will move it to another directory.

Shows are moved to match the following format.
TV Shows
TVDestPath\(Show Name)\Season - (Season #)\(Show Name) (Season #)x(Episode #)
Anime
AnimeDestPath\(Show Name)\(Show Name) - (Episode #)
Note - The anime portion uses whatever number comes on the file

The only needed changes are in the config file. Don't leave any empty lines! Each show should be on its own line. Feel free to edit the paths that are present. For shows that need to be renamed differently than how the come from the bittorrent place a semicolon between the searching name and the final name. White space does not matter in the naming because of the way the regexps are set up in the python script.

Example show lines:
The Amazing Race
Human Target;Human Target (2009)


The first line will search for "The Amazing Race" replacing the whitespace with any characters. When renamed the show will have the same name. in the second line however it will search for "Human Target" but rename it with the show title "Human Target (2009)". This can be used when the show needs a year in the name to be scraped correctly or when there are more than one versions of a title that you want to put in the same folder. The latter can be achieved with multiple lines with different search parts but the same naming part.

Instalation Instructions:
1) Make sure you have python installed (you may need to add it to your path variable) (this was made for 2.7 but may work for other versions)
2) Download and unzip file.
3) Put it in whatever folder you want but make sure the config file is there too.
4) Edit the config file to find your shows.
5) Set up to run automatically or run it periodically when you want.

In my set up I have uTorrent automatically downloading episodes from RSS feeds for different series. I use EventGhost directory watcher to see when the downloads are finished by seeing when they are moved into the downloaded folder. At this point I call a batch file that runs this utility to rename the episodes. The batch file then runs the commandline version of Media Companion to update the episodes.

I hope everyone likes this little utilities. Please leave comments. I would like to know whether it was a useful little program or not. If there are any questions I will try to answer them. I don't plan on making many changes but may if there is a great demand for it. Feel free to modify it if you need to.

Python Renamer
Reply

Logout Mark Read Team Forum Stats Members Help
Show Renaming Utility - Python Script moves / renames dowloaded TV Show Episode files0