Dedupe TV episodes by quality. Keep best (resolution + PROPER/REPACK), delete worse + sidecar files.
Project description
dedupe-episodes
Scan a TV show library, detect duplicate episodes at different qualities,
keep the best, delete the rest (and their sidecar .nfo / -thumb.jpg /
.srt files).
Quality ranking
- Resolution: 2160p > 1080p > 720p > 480p
- Same resolution: PROPER / REPACK beats plain
- Tied (same resolution AND same proper flag): WARN + skip — manual review
Resolution always outranks proper. So a 2160p plain release beats a
1080p Proper, but a 1080p Proper beats a plain 1080p.
Usage
uv run main.py /path/to/shows # dry-run (default — prints plan, deletes nothing)
uv run main.py /path/to/shows --delete # actually delete losers + their sidecars
uv run main.py /path/to/shows --ext mkv --ext mp4 # restrict scanned extensions
Episodes are grouped by (parent directory, season, episode), parsed via
guessit. Sidecars are siblings whose
filename starts with the video stem followed by ., -, or _.
Install
git clone <this-repo>
cd dedupe-episodes
uv sync
Tests
uv run pytest
53 tests, all run on an in-memory fake filesystem via
pyfakefs — no real disk I/O,
no host pollution.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dedupe_episodes-0.1.0.tar.gz.
File metadata
- Download URL: dedupe_episodes-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
159cf44c8bfed760da49041077ed6723af5b79496aa86f1626bd60856f50175b
|
|
| MD5 |
ff75e2fd033809030e0d643c7149aa34
|
|
| BLAKE2b-256 |
61faeab07ac9e90dd27daa74dada38525066f892ce1e5a8bae8990d761c29520
|
File details
Details for the file dedupe_episodes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dedupe_episodes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
142daf4df1aa06dafccff2b77446f6a5a3473072dc917cbfff308171235efcf0
|
|
| MD5 |
bb32a435ffe216cb5d6d2c02d6b49a49
|
|
| BLAKE2b-256 |
2cc02b54b022bbc29ef270c8362725d35cbb2eeb0387abd7fafc4262d82b5752
|