Just automates the subtitles renaming job. subtitles will try to rename your subtitles matching video files names.
- python >= 3.5
Download/clone the project, move inside:
cd /subtitles
and execute:
python fix_subtitles.py -s -p /path/to/my/series/dir
subtitles will recursively search all the video and subtitles files under the provided path, then it will try to rename the subtitle as the video files if the season/episode matches.
subtitles execution options:
- -p --path Path to the series/movies
- -s --series Fix series subtitles, matching seasons/episodes
- -m --movies Fix movies subtitles
Fixing series subtitles:
python fix_subtitles.py -s -p /path/to/my/series
Fixing a movie subtitle:
python fix_subtitles.py -m -p /path/to/my/movie
In order avoid the terminal and ease the usage of subtitles in Ubuntu's Nautilus file manager, a Makefile is provided. When executed, you will be able to use subtitles right-clicking on any file, being inside the series/movie directory you want to fix. Tested in Ubuntu 18.04.
In the project root execute:
make
If the execution was successful, you can got to the series dir you need to fix and right-click on any file and two new options will be displayed inside the "Scripts" option: "fixseries" and "fixmovies".
In the project root execute:
make uninstall
All the original subtitles are stored inside a new "original_subs" directory, so do not worry if something goes wrong or you click on "fixmovies" and you meant "fixseries", you can recover the original ones.
Execute:
pip install -r requirements-test.txt
pytest