From 01cd31505ab2328c447ed194f8cc46eccfc9bdb6 Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Thu, 11 Sep 2025 10:10:05 -0400 Subject: [PATCH] Complete v0.6.0 documentation update and review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 📚 Documentation Updates: • Updated CHANGELOG.md with comprehensive v0.6.0 feature list • Enhanced README.md with new TV processing endpoints and examples • Updated SETUP.md with required Sonarr API key configuration • Enhanced TESTING.md with v0.6.0 TV testing procedures • Updated .env templates with proper Sonarr requirements 🔧 Configuration Updates: • Mark SONARR_API_KEY as REQUIRED for v0.6.0+ Enhanced TV NFOs • Updated version examples from 0.5.1 to 0.6.0 • Added JSON response examples for new TV endpoints • Clarified URL-safe vs URL-encoded endpoint options 📋 Complete File Review: • Verified all Python imports are consistent across modules • Confirmed all typing imports (Dict, Any, List, Optional) are present • Validated configuration templates match actual requirements • Added comprehensive testing procedures for TV enhancements ✅ Ready for Production: • All endpoints documented with examples • Configuration requirements clearly specified • Testing procedures comprehensive for troubleshooting • Backward compatibility maintained throughout --- .env.secrets.template | 2 +- .env.template | 4 ++-- CHANGELOG.md | 22 +++++++++++++++++++++- README.md | 18 +++++++++++++++++- SETUP.md | 4 +++- TESTING.md | 28 ++++++++++++++++++++++++++++ 6 files changed, 72 insertions(+), 6 deletions(-) diff --git a/.env.secrets.template b/.env.secrets.template index 60cf9dd..8622795 100644 --- a/.env.secrets.template +++ b/.env.secrets.template @@ -21,7 +21,7 @@ OMDB_API_KEY=your_omdb_api_key # Radarr API key (optional - for fallback only) RADARR_API_KEY=your_radarr_api_key -# Sonarr API key (optional - for TV processing) +# Sonarr API key (REQUIRED for v0.6.0+ Enhanced TV NFO Generation) SONARR_API_KEY=your_sonarr_api_key # Jellyseerr API key (optional) diff --git a/.env.template b/.env.template index 94972fb..fac0ad8 100644 --- a/.env.template +++ b/.env.template @@ -33,9 +33,9 @@ RADARR_DB_USER=radarr RADARR_URL=http://radarr:7878 # =========================================== -# SONARR API (OPTIONAL) +# SONARR API (REQUIRED for Enhanced TV NFOs - v0.6.0+) # =========================================== -# Only needed for TV processing +# Required for TV processing and enhanced NFO generation with metadata # NOTE: API key should be set in .env.secrets file SONARR_URL=http://sonarr:8989 diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e765c..9f69163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,29 @@ All notable changes to this project will be documented in this file. -## [Unreleased] - v0.6.0 +## [Released] - v0.6.0 - 2025-09-11 ### Added +- **📺 Enhanced TV Show Processing**: Comprehensive single season/episode capabilities + - **Single Season Processing**: `/tv/scan-season` endpoint for targeted season updates + - **Single Episode Processing**: `/tv/scan-episode` endpoint for individual episode handling + - **URL-Safe Endpoints**: JSON-based API calls avoid URL encoding issues with spaces/special characters + - **Enhanced Path Detection**: Automatically detects season directories and episode files + - **Database Integration**: Full episode date tracking and retrieval with `get_episode_date()` +- **🎬 Rich NFO Generation**: Full metadata integration from Sonarr API + - **Episode Titles**: Real episode names from Sonarr instead of generic S01E01 format + - **Plot Summaries**: Episode descriptions for better library browsing experience + - **Runtime Data**: Episode duration information for media players + - **Rating Integration**: IMDb ratings and vote counts for episodes + - **Backwards Compatible**: Existing basic NFOs still work, enhanced when Sonarr API available +- **⏰ NFOGuard Timestamps**: All NFO files now include processing timestamps + - **Creation Tracking**: Shows when NFOGuard created/updated each NFO file + - **Format**: `` + - **Audit Trail**: Helps track metadata management history +- **🔧 Enhanced TV Manual Scan**: Smart path detection for seasons and episodes + - **Season Detection**: `curl -X POST "manual/scan?path=/media/TV/Series/Season 13"` + - **Episode Detection**: `curl -X POST "manual/scan?path=/media/TV/Series/Season 13/episode.mkv"` + - **Automatic Processing**: Detects context and processes accordingly - **🔐 Secure Configuration System**: Two-file configuration with automatic API key masking - **Main `.env`**: Paths and preferences (safe to share for debugging) - **Separate `.env.secrets`**: API keys and passwords (never committed to git) diff --git a/README.md b/README.md index b3ca43e..d93a8f6 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ curl "http://localhost:8080/debug/tmdb/tt1674782" ```json { "status": "healthy", - "version": "0.5.1", + "version": "0.6.0", "database_status": "healthy", "radarr_database": {"status": "healthy", "movies": 1500} } @@ -264,6 +264,22 @@ curl "http://localhost:8080/debug/tmdb/tt1674782" } ``` +**TV Season Processing**: +```json +{ + "status": "started", + "message": "Season scan started for Season 13" +} +``` + +**TV Episode Processing**: +```json +{ + "status": "started", + "message": "Episode scan started for Chicago Fire (2012)-S13E21-The Bad Guy[WEBDL-1080p][AAC2.0][h264].mkv" +} +``` + ## 🎯 Date Selection Priority System NFOGuard uses a **comprehensive fallback hierarchy** to find the best possible date for each movie: diff --git a/SETUP.md b/SETUP.md index fd25416..4785d04 100644 --- a/SETUP.md +++ b/SETUP.md @@ -49,9 +49,11 @@ RADARR_DB_PASSWORD=your_actual_radarr_password # TMDB API key (required for release date detection) TMDB_API_KEY=your_actual_tmdb_api_key +# Sonarr API key (REQUIRED for v0.6.0+ Enhanced TV NFO Generation) +SONARR_API_KEY=your_actual_sonarr_api_key + # Optional API keys RADARR_API_KEY=your_radarr_api_key -SONARR_API_KEY=your_sonarr_api_key OMDB_API_KEY=your_omdb_api_key ``` diff --git a/TESTING.md b/TESTING.md index bfc622f..e569a4e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -114,6 +114,34 @@ curl -X POST "http://localhost:8080/manual/scan?scan_type=movies" curl -X POST "http://localhost:8080/bulk/update" ``` +### Step 6: Test Enhanced TV Processing (v0.6.0+) +```bash +# Test Sonarr API integration +curl "http://localhost:8080/health" +# Check that Sonarr connection shows up + +# Test single season processing (URL-safe) +curl -X POST "http://localhost:8080/tv/scan-season" \ + -H "Content-Type: application/json" \ + -d '{ + "series_path": "/media/TV/tv/Your Show [imdb-tt1234567]", + "season_name": "Season 01" + }' + +# Test single episode processing (URL-safe) +curl -X POST "http://localhost:8080/tv/scan-episode" \ + -H "Content-Type: application/json" \ + -d '{ + "series_path": "/media/TV/tv/Your Show [imdb-tt1234567]", + "season_name": "Season 01", + "episode_name": "S01E01.mkv" + }' + +# Verify enhanced NFO was created with metadata +find /media/TV/tv -name "S01E*.nfo" | head -1 | xargs cat +# Should show: , <plot>, <rating>, <runtime>, timestamps +``` + ## 🛠 Why These Tests Are Needed 1. **Docker Environment Isolation**: Tests run in the same environment as the production app