This script is designed to rename TV series libraries for Jellyfin. It automatically renames season folders and files according to Jellyfin requirements.
- Python 3.6 or higher
- Download the latest Python installer from python.org
- Run the installer and make sure to check "Add Python to PATH"
- Verify installation by opening Command Prompt and typing:
python --version
- Using Homebrew (recommended):
brew install python
- Or download the installer from python.org
- Verify installation by opening Terminal and typing:
python3 --version
sudo apt update
sudo apt install python3sudo dnf install python3-
Clone the repository:
git clone https://github.com/yourusername/jellyfin-renamer.git cd jellyfin-renamer -
Install dependencies (if any):
pip install -r requirements.txt
Run the script by specifying the path to your TV series folder:
python jellyfin_renamer.py /path/to/your/seriesThe script works with a structure like this:
Series Name/
├── Season 1/
│ ├── Test Show S1 E1.mp4
│ └── Test Show S1E2.mkv
├── Season 2/
│ ├── Test.Show.S2E1.avi
│ └── Test.Show.S2E2.mp4
└── S3/
├── Test.Show.S3E1.mp4
└── Test.Show.S3E2.mkv
You specify the path to the series folder that contains seasons, which contain episodes. The script looks for a number in the season folder name - the season number. In file names, it looks for patterns like S1 and E1 and similar, then renames the season folders and files to the Jellyfin standard.
If you have a folder structure:
Test Show/
├── Season 1/
│ ├── Test.Show.S1E1.mp4
│ └── Test.Show.S1E2.mkv
├── Season 2/
│ ├── Test.Show.S2E1.avi
│ └── Test.Show.S2E2.mp4
└── S3/
├── Test.Show.S3E1.mp4
└── Test.Show.S3E2.mkv
After running the script, the structure will be renamed to:
Test Show/
├── Season 01/
│ ├── Test.Show.S1E1.S01.E01.mp4
│ └── Test.Show.S1E2.S01.E02.mkv
├── Season 02/
│ ├── Test.Show.S2E1.S02.E01.avi
│ └── Test.Show.S2E2.S02.E02.mp4
└── Season 03/
├── Test.Show.S3E1.S03.E01.mp4
└── Test.Show.S3E2.S03.E02.mkv
We welcome contributions! If you have ideas or want to fix a bug, please create a pull request or issue.
This project is licensed under the MIT License. See the LICENSE file for details.