2026-11-18 20:03:43 -07:00
2022-01-03 10:52:06 +03:00
2026-11-18 20:03:43 -07:00
2022-01-12 23:24:28 +03:00

movie-renamer

Parses messy scene-release filenames (movies/episodes) into structured chunks and renames them into a clean, canonical form.

The.Walking.Dead.S04E06.Live.Bait.1080p.WEB-DL.Rus.Eng.HDCLUB.mkv

parses into name, season, episode, episode_name, resolution, quality, language, etc., then reassembles them in a fixed order.

Usage

renamer.py parse TARGET      # print parsed chunks, don't touch files
renamer.py rename TARGET     # rename files in place

TARGET is a single file or a directory (processed recursively). Only .mkv, .avi, .ts files are touched.

Options

--set TYPE=VALUE   override a parsed chunk (repeatable)
--season N         number episodes E01, E02, ... across a directory
-v, --verbose      debug logging

Examples

Fix a title the parser can't fully make sense of:

$ renamer.py rename --set name=Vikings ./raw/

Number a batch of episode files as season 1, forcing the show name:

$ renamer.py rename --season 1 \
    --set name=Prizrak.v.dospexax.Sindrom.odinochki ./season1/

Prizrak...(01.serija.iz.52).2004.x264.BDRip.(1080p).mkv
  -> Prizrak.v.dospexax.Sindrom.odinochki.S01E01.2004.1080p.BDRip.x264.mkv
Prizrak...(02.serija.iz.52).2004.x264.BDRip.(1080p).mkv
  -> Prizrak.v.dospexax.Sindrom.odinochki.S01E02.2004.1080p.BDRip.x264.mkv

Development

pip install -r requirements-dev.txt
pytest
S
Description
No description provided
Readme
63 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%