{"id":50882297,"url":"https://github.com/flowm/mdupes","last_synced_at":"2026-06-15T14:01:19.571Z","repository":{"id":360280233,"uuid":"1089201009","full_name":"Flowm/mdupes","owner":"Flowm","description":"Find and delete duplicate media files based on filename","archived":false,"fork":false,"pushed_at":"2026-05-25T18:13:52.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T20:17:57.457Z","etag":null,"topics":["duplicate-detection","duplicates","jellyfin","media","plex"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flowm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-04T02:50:13.000Z","updated_at":"2026-05-25T18:13:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Flowm/mdupes","commit_stats":null,"previous_names":["flowm/mdupes"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Flowm/mdupes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowm%2Fmdupes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowm%2Fmdupes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowm%2Fmdupes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowm%2Fmdupes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flowm","download_url":"https://codeload.github.com/Flowm/mdupes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowm%2Fmdupes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34365597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["duplicate-detection","duplicates","jellyfin","media","plex"],"created_at":"2026-06-15T14:01:17.885Z","updated_at":"2026-06-15T14:01:19.564Z","avatar_url":"https://github.com/Flowm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdupes - Media Duplicates Finder\n\nA Python command-line tool with an interactive TUI to identify and manage duplicate media files in Jellyfin, Plex, or similar media server directory structures.\n\n## Features\n\n- 🔍 **Smart duplicate detection** - Groups files by series/season/episode or movie title/year\n- 📺 **TV series support** - Handles complex episode naming with season and episode detection\n- 🎬 **Movie support** - Identifies duplicates by title and year\n- 🖥️ **Interactive TUI** - ncdu-style tree view with [Textual](https://textual.textualize.io/) framework\n- 📊 **Quality comparison** - Shows resolution (720p, 1080p, 4K) and codec (H.264, H.265) for each file\n- 📈 **File size tracking** - Displays individual file sizes and total storage per series/movie\n- 🎯 **Smart filtering** - Toggle between showing all media or only duplicates\n- 🔄 **Multiple sort options** - Sort by name, file count, total size, or duplicate count\n- 💾 **Save/load scans** - Cache scan results for instant loading of large libraries\n- 🗑️ **File management** - Delete or rename files directly from the TUI\n- ⚡ **Parallel processing** - Fast scanning using all CPU cores\n- 📁 **Title normalization** - Handles variations like \"Marvel's\" vs \"Marvels\", \"S.H.I.E.L.D.\" vs \"SHIELD\"\n\n## Installation\n\n1. Clone or download this repository\n2. Install the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nOr install dependencies manually:\n\n```bash\npip install click guessit textual\n```\n\n## Usage\n\n### Basic Scanning\n\nScan a single directory:\n```bash\npython mdupes.py /path/to/media\n```\n\nScan multiple directories:\n```bash\npython mdupes.py /path/to/series /path/to/movies\n```\n\nScan with wildcards:\n```bash\npython mdupes.py /mnt/media/*\n```\n\n### Saving and Loading Results\n\nFor large media collections, scanning can take time. Save results to reload instantly:\n\n**Save results while scanning:**\n```bash\npython mdupes.py --save results.json /path/to/media\n```\n\n**Load previously saved results:**\n```bash\npython mdupes.py --load results.json\n```\n\n**Short form:**\n```bash\n# Save\npython mdupes.py -s results.json /path/to/media\n\n# Load\npython mdupes.py -l results.json\n```\n\n## TUI Navigation\n\n### Keyboard Shortcuts\n\n**Navigation:**\n- `↑/↓` or `j/k` - Move up/down the tree\n- `←` - Collapse current node\n- `→` - Expand current node\n- `c` - Collapse current node and all children\n- `e` - Expand current node and all children\n\n**Actions:**\n- `f` - Toggle between \"All Media\" and \"Duplicates Only\" view\n- `s` - Open sort menu (alphabetic, file count, total size, duplicate count)\n- `d` - Delete selected file (with confirmation)\n- `r` - Rename selected file\n- `m` - Mark/unmark file for deletion\n- `Ctrl+D` - Delete all marked files (with confirmation)\n- `Ctrl+U` - Unmark all files\n- `q` - Quit\n\n**Multi-Select Workflow:**\n1. Navigate to a file and press `m` to mark it (shows ✓)\n2. Mark additional files as needed\n3. Press `Ctrl+D` to delete all marked files at once\n4. Use `Ctrl+U` to clear all marks if needed\n\n## Example Display\n\n```\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Media Duplicates                             Mode: Duplicates Only   ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n\n▼ 📺 Series (11223 files, 45.2GB) [720p, 1080p, 2160p] [H.264, H.265] 773 duplicates\n├── ▼ Breaking Bad (62 files, 52.1GB) [1080p] [H.264, H.265] 5 duplicates\n│   ├── ▶ Season 1 (7 files, 5.8GB) [1080p] [H.264]\n│   └── ▼ Season 2 (14 files, 11.2GB) [1080p] [H.264, H.265] 1 duplicate\n│       ├── ▶ S02E01 - Seven Thirty-Seven (1 file, 800MB) [1080p] [H.264]\n│       ├── ▼ S02E02 - Grilled (2 files, 1.6GB) [1080p] [H.264, H.265] 1 duplicate\n│       │   ├── Breaking.Bad.S02E02.1080p.BluRay.x264.mkv (1 file, 850MB) [1080p] [H.264]\n│       │   └── Breaking.Bad.S02E02.1080p.BluRay.x265.mkv (1 file, 780MB) [1080p] [H.265]\n│       └── ▶ S02E03 - Bit by a Dead Bee (1 file, 820MB) [1080p] [H.264]\n└── ▼ The Office (201 files, 98.3GB) [720p, 1080p] [H.264] 15 duplicates\n\n▼ 🎬 Movies (150 files, 425.6GB) [720p, 1080p, 2160p] [H.264, H.265] 12 duplicates\n└── ▼ Inception (3 files, 12.5GB) [720p, 1080p, 2160p] [H.264, H.265] 2 duplicates\n    ├── Inception.2010.720p.BluRay.x264.mkv (1 file, 4.2GB) [720p] [H.264]\n    ├── Inception.2010.1080p.BluRay.x264.mkv (1 file, 8.1GB) [1080p] [H.264]\n    └── Inception.2010.2160p.UHD.BluRay.x265.mkv (1 file, 18.5GB) [2160p] [H.265]\n```\n\n### Color Coding\n\n- **Cyan** - Titles and filenames\n- **Yellow** - Resolutions (720p, 1080p, 2160p)\n- **Red** - Duplicate counts (when \u003e 0)\n- **Dim/Gray** - File counts, sizes, codecs, and metadata\n\n## Use Cases\n\n### Library Cleanup\n\nAfter upgrading your collection or migrating between servers:\n```bash\npython mdupes.py --save cleanup.json /var/lib/jellyfin/media\n```\n\nNavigate the TUI, press `d` to delete lower-quality duplicates.\n\n### Quality Comparison\n\nSee all quality variations at a glance. The TUI shows resolution and codec for easy comparison:\n- Delete 720p versions after upgrading to 1080p\n- Keep H.265 versions and remove larger H.264 files\n- Identify episodes with mixed quality\n\n### Storage Analysis\n\nSort by total size (`s` → \"Total size\") to find which series consume the most space:\n```bash\npython mdupes.py /mnt/media/series\n```\n\n### Duplicate Prevention\n\nAfter downloading new content, check for duplicates before adding to your library:\n```bash\npython mdupes.py ~/Downloads/Complete /mnt/media/series\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowm%2Fmdupes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowm%2Fmdupes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowm%2Fmdupes/lists"}