feat: add movies support
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
# Jelly Dedup
|
||||
|
||||
A command-line tool to identify and manage duplicate episodes in your Jellyfin media server. This tool analyzes your TV show library, detects duplicate episodes, and provides removal commands to free up storage space.
|
||||
A command-line tool to identify and manage duplicate episodes and movies in your Jellyfin media server. This tool analyzes your TV show and movie libraries, detects duplicates, and provides removal commands to free up storage space.
|
||||
|
||||
## Features
|
||||
|
||||
- Scans all TV shows in your Jellyfin library
|
||||
- Scans TV shows and/or movies in your Jellyfin library
|
||||
- Identifies duplicate episodes based on season and episode numbers
|
||||
- Intelligently selects lower-quality files for removal
|
||||
- Identifies duplicate movies based on title and year
|
||||
- Intelligently selects lower-quality files for removal using smart codec comparison
|
||||
- Generates shell commands for safe file deletion
|
||||
- Displays space savings estimates
|
||||
- Supports custom path prefix removal for cleaner output
|
||||
- Flexible media type selection (TV shows only, movies only, or both)
|
||||
|
||||
## Build Reqs
|
||||
|
||||
@@ -84,6 +86,9 @@ Options:
|
||||
-p, --path-prefix-to-remove <PATH_PREFIX_TO_REMOVE>
|
||||
Path prefix to remove from displayed file paths [env: PATH_PREFIX_TO_REMOVE]
|
||||
|
||||
-t, --media-type <MEDIA_TYPE>
|
||||
Type of media to process [default: both] [possible values: tv, movies, both]
|
||||
|
||||
-h, --help
|
||||
Print help
|
||||
|
||||
@@ -93,22 +98,32 @@ Options:
|
||||
|
||||
### Examples
|
||||
|
||||
1. **Using default local server with API key:**
|
||||
1. **Scan both TV shows and movies (default):**
|
||||
```bash
|
||||
jelly-dedup --api-key abc123def456
|
||||
```
|
||||
|
||||
2. **Specifying a remote server:**
|
||||
2. **Scan TV shows only:**
|
||||
```bash
|
||||
jelly-dedup --api-key abc123def456 --media-type tv
|
||||
```
|
||||
|
||||
3. **Scan movies only:**
|
||||
```bash
|
||||
jelly-dedup --api-key abc123def456 --media-type movies
|
||||
```
|
||||
|
||||
4. **Specifying a remote server:**
|
||||
```bash
|
||||
jelly-dedup --jellyfin-url https://jellyfin.example.com --api-key abc123def456
|
||||
```
|
||||
|
||||
3. **Removing path prefix for cleaner output:**
|
||||
5. **Removing path prefix for cleaner output:**
|
||||
```bash
|
||||
jelly-dedup --api-key abc123def456 --path-prefix-to-remove /mnt/media
|
||||
```
|
||||
|
||||
4. **Using environment variables:**
|
||||
6. **Using environment variables:**
|
||||
```bash
|
||||
export JELLYFIN_URL=http://localhost:8096
|
||||
export JELLYFIN_API_KEY=abc123def456
|
||||
@@ -126,16 +141,28 @@ Options:
|
||||
## Output
|
||||
|
||||
The tool will:
|
||||
1. Scan all TV shows in your library
|
||||
2. Display duplicate episodes found for each show
|
||||
1. Scan TV shows and/or movies in your library (depending on `--media-type` option)
|
||||
2. Display duplicate episodes/movies found with detailed quality information
|
||||
3. Provide a summary with:
|
||||
- Total episodes with duplicates
|
||||
- Total episodes/movies with duplicates
|
||||
- Total files marked for deletion
|
||||
- Estimated space savings in GB
|
||||
4. Generate `rm` commands for each file to be deleted
|
||||
|
||||
**Note:** The tool does NOT delete files automatically. It only generates the commands for you to review and execute manually.
|
||||
|
||||
### Quality Selection
|
||||
|
||||
The tool uses intelligent quality comparison to select the best version:
|
||||
- **Resolution First**: Higher resolution always wins (1080p beats 720p)
|
||||
- **Codec Efficiency**: When resolutions match, codec efficiency is considered:
|
||||
- AV1: 2.0x multiplier (most efficient)
|
||||
- H.265/HEVC: 1.5x multiplier
|
||||
- H.264: 1.0x baseline
|
||||
- **Effective Bitrate**: Calculates quality based on bitrate × codec efficiency
|
||||
|
||||
For example, a 1080p H.265 file at 6 Mbps (effective: 9.0) will be selected over a 1080p H.264 file at 8 Mbps (effective: 8.0).
|
||||
|
||||
## Safety
|
||||
|
||||
- The tool is read-only and makes no modifications to your Jellyfin library or filesystem
|
||||
|
||||
Reference in New Issue
Block a user