This is pretty much the first thing I ever wrote in Python, so... it's not great!
Make sure you have an (API key for TheTVDB.com](https://thetvdb.com/api-information), then create a file called apikey
containing only that key.
Fetches season and episode information for a television show from TheTVDB.com.
Positional:
- The name of the television series.
Flags:
- -v, --dvd: List episodes by DVD order instead of aired order (if available).
Renames media files in a directory to correspond to the episode list of a television show. (Useful when you want to correctly label episodes from ripped DVDs for use in Plex, for example.) Episode information is scraped from TheTVDB.com, via season_information.py
.
Positional:
- The name of the television series.
Options:
- -d, --dir: The directory containing the media files. Defaults to present working directory.
- -s, --season: The season at which to begin episode enumeration. Defaults to season one.
- -e, --episode: The episode at which to begin enumeration. Defaults to episode one of the specified season.
Flags:
- -v, --dvd: List episodes by DVD order instead of aired order (if available).
The label_episodes.py
program will only rename files with the following extensions:
- .aaf
- .3gp
- .asf
- .avcd
- .avi
- .flv
- .mpg, .mpeg, .mpe
- .m4v
- .mkv
- .mov
- .ogg
- .swf
- .wmv
Files will be named in the following format:
FORMAT = "{series_name} s{season:02}e{episode:02} {episode_name}"
This one's mostly just for me. It walks a directory tree and unpacks all RAR files it finds. Useful if your private tracker (or whatever) insists on putting every episode of something in its own RAR file in its own subdirectory. There are definitely more powerful (and more useful) tools out there, but this happens to be exactly what I need, so... meh.
Options:
- -d, --dir: The root directory at which to begin looking for RARs. Defaults to present working directory.
- -t, --target: The directory in which to place the unpacked files. Defaults to the aforementioned directory. (Not implemented yet!)
- Add directories by season (using os.renames, with constant for format).
- Add support for episodes that are "missing" (the user doesn't have the file: skip them in enumeration/labeling).
- Add support fo linked files (subtitle files, for example): if they have the same name, but different extension, treat them as a unit.
- UTF-8 encoded unicode (common with TheTVDB.com) messes with the character count in tables displayed by
season_information.py
. - It looks like season_information.py crashes when TheTVDB.com returns no search results. That's an embarassingly trivial error.
TV information is provided by TheTVDB.com, but this project is not endorsed or certified by TheTVDB.com or its affiliates.
Written by Gem Newman. Website | GitHub | Twitter
This work is licensed under Creative Commons BY-SA 4.0.
Remember: GitHub is not my CV.