diff --git a/Cargo.toml b/Cargo.toml index 4595c5a..1d00fb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,4 +9,4 @@ tokio = { version = "1", features = ["full"] } serde = { version = "1.0", features = ["derive"] } dotenv = "0.15" shell-escape = "0.1" -clap = { version = "4.5", features = ["derive"] } +clap = { version = "4.5", features = ["derive", "env"] } diff --git a/README.md b/README.md index 221de49..e3fd583 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# jelly-dedup +# 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. + ## Features - Scans all TV shows in your Jellyfin library diff --git a/src/main.rs b/src/main.rs index bb1af63..c7c0d11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,6 @@ use clap::Parser; use client::JellyfinClient; use display::FileToDelete; use std::collections::HashSet; -use std::env; use std::error::Error; /// A tool to find and manage duplicate episodes in Jellyfin @@ -17,15 +16,15 @@ use std::error::Error; #[command(author, version, about, long_about = None)] struct Args { /// Jellyfin server URL - #[arg(short, long, env = "JELLYFIN_URL", default_value = "http://localhost:8096")] + #[arg(short, long, env("JELLYFIN_URL"), default_value = "http://localhost:8096")] jellyfin_url: String, /// Jellyfin API key - #[arg(short, long, env = "JELLYFIN_API_KEY")] + #[arg(short, long, env("JELLYFIN_API_KEY"))] api_key: String, /// Path prefix to remove from displayed file paths - #[arg(short, long, env = "PATH_PREFIX_TO_REMOVE")] + #[arg(short, long, env("PATH_PREFIX_TO_REMOVE"))] path_prefix_to_remove: Option, }