Skip to main content

Dedupe TV episodes by quality. Keep best (resolution + PROPER/REPACK), delete worse + sidecar files.

Project description

dedupe-episodes

PyPI version Python versions License CI

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

  1. Resolution: 2160p > 1080p > 720p > 480p
  2. Same resolution: PROPER / REPACK beats plain
  3. 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.

Install

CLI app — recommended way is to install it isolated from your system Python:

# isolated install with uv (recommended)
uv tool install dedupe-episodes

# isolated install with pipx
pipx install dedupe-episodes

# run once without installing
uvx dedupe-episodes /path/to/shows
pipx run dedupe-episodes /path/to/shows

# or plain pip (into current env)
pip install dedupe-episodes

Usage

dedupe-episodes /path/to/shows           # dry-run (default — prints plan, deletes nothing)
dedupe-episodes /path/to/shows --delete  # actually delete losers + their sidecars
dedupe-episodes /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 _.

Develop locally

git clone https://github.com/asm0dey/dedupe-episodes
cd dedupe-episodes
uv sync
uv run dedupe-episodes /path/to/shows

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


Download files

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

Source Distribution

dedupe_episodes-0.1.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

dedupe_episodes-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file dedupe_episodes-0.1.1.tar.gz.

File metadata

  • Download URL: dedupe_episodes-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dedupe_episodes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b097bd0400fa0ad83957b257eb13bab4fcb72bb15912ccfaa8a5b4732f776e6a
MD5 04ae4e0bfece7e1fd9aa9a179848c081
BLAKE2b-256 24a9fe8de41fe1d00113dd94875b0886cc4cad27504831fa72050fce3b8f9d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for dedupe_episodes-0.1.1.tar.gz:

Publisher: publish.yml on asm0dey/dedupe-episodes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dedupe_episodes-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dedupe_episodes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd31a4e6aca267f6c265f4d8ea77219341b4ceb7cbb7d60d9928474ef86a6134
MD5 80ad56749a07ac6cb992bd3c68adfd6f
BLAKE2b-256 da3ec4cb6f12e2858e8c2c21731c1da88ec8000d3fb544b6f6064b68e70ec51e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dedupe_episodes-0.1.1-py3-none-any.whl:

Publisher: publish.yml on asm0dey/dedupe-episodes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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