Skip to main content

Rename TV show Media files with Respective episode Titles/Names.

Project description

Intro

Shownamer - Media Renamer

A lightweight Python CLI tool that renames TV show episode video files by fetching their actual episode titles. Movies are not supported, All TV Shows and Sitcoms are supported.

[!NOTE] Fetches details and Names from TVmaze.

Features

  • Automatically detects and renames files like:

    Before: Malcolm in the Middle S01E10.mkv
    After: Malcolm in the Middle S01E10 - Stock Car Races.mkv
    
  • Fetches episode titles using the free TVmaze API.

  • Cleans illegal filename characters automatically.

  • CLI flags for:

    • Custom directory
    • File extension filter
    • Dry-run mode
    • Verbose logging

Usage

Requirements

  • Python 3.6+
  • requests module

Install requirements:

pip install requests

Run the script

python shownamer.py

Example Usage

# Rename all valid video files in the current directory
python shownamer.py

# Specify a custom directory
python shownamer.py --dir "/path/to/your/episodes"

# Preview changes without renaming files
python shownamer.py --dry-run

# Limit to specific extensions
python shownamer.py --ext mkv mp4 avi

# Verbose mode (shows skipped files, debug info)
python shownamer.py --verbose

Supported Formats

The script supports the following file name pattern:

Show Name S01E01.ext

It handles these video formats by default:

  • .mkv
  • .mp4
  • .avi
  • .mov
  • .flv

You can customize this with the --ext flag.

FAQ

Will this overwrite existing files?

No. The script does not overwrite files. It renames only when the target filename does not exist. You can use --dry-run to preview the result first.

Does it fetch subtitles or cover images?

No. This tool only renames the video files with accurate episode titles.

Contributions

Pull requests, suggestions, and issues are welcome! Let's make it smarter and broader (e.g., subtitle renaming, fuzzy matching, show aliases, etc.).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shownamer-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shownamer-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file shownamer-1.0.0.tar.gz.

File metadata

  • Download URL: shownamer-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for shownamer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 12120bc77605a3396c408952e12713d264f97d1f79cace01fac83a4000cb8903
MD5 6034696868faf4e8980f5e271429f522
BLAKE2b-256 ea4ab1e87481652feab10464c86e6f6b4d956b2011451e5809001c9a8c40f3a8

See more details on using hashes here.

File details

Details for the file shownamer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: shownamer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for shownamer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79223d4f5c25f11bbda1b4e03544c9539d8cc5677ca35a0693a89bde22abbb74
MD5 8c206882d5eefb779a9685c1098a7025
BLAKE2b-256 2f021b4826b7d0fff541e37ef07a36de1f164c4b186bb0bec375918d58be7ba7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page