From 1eb710078f4a37d6175a0109b3c8270b81fb291d Mon Sep 17 00:00:00 2001 From: Lucas Oskorep Date: Fri, 10 Oct 2025 23:38:50 -0400 Subject: [PATCH] fix: incorrect env handling --- Cargo.toml | 2 +- README.md | 3 ++- src/main.rs | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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, }