Skip to content

A Python script that automatically renames TV series folders and files to match Jellyfin's naming conventions. It handles season folders (e.g., "Season 1", "S1") and episode files (e.g., "S1E1", "S01E01"), ensuring your media library is properly organized for Jellyfin media server.

License

Notifications You must be signed in to change notification settings

ejcom/jellyfin-renamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Jellyfin Renamer

This script is designed to rename TV series libraries for Jellyfin. It automatically renames season folders and files according to Jellyfin requirements.

Requirements

  • Python 3.6 or higher

Python Installation

Windows

  1. Download the latest Python installer from python.org
  2. Run the installer and make sure to check "Add Python to PATH"
  3. Verify installation by opening Command Prompt and typing:
    python --version

macOS

  1. Using Homebrew (recommended):
    brew install python
  2. Or download the installer from python.org
  3. Verify installation by opening Terminal and typing:
    python3 --version

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install python3

Linux (Fedora)

sudo dnf install python3

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/jellyfin-renamer.git
    cd jellyfin-renamer
  2. Install dependencies (if any):

    pip install -r requirements.txt

Usage

Run the script by specifying the path to your TV series folder:

python jellyfin_renamer.py /path/to/your/series

The 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.

Example

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

Contributing

We welcome contributions! If you have ideas or want to fix a bug, please create a pull request or issue.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Python script that automatically renames TV series folders and files to match Jellyfin's naming conventions. It handles season folders (e.g., "Season 1", "S1") and episode files (e.g., "S1E1", "S01E01"), ensuring your media library is properly organized for Jellyfin media server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages