diff --git a/CHANGELOG.md b/CHANGELOG.md index 74838aa..2e197b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,19 @@ All notable changes to this project will be documented in this file. # Changelog +## [0.5.1] - 2025-09-08 + +### Changed +- **BREAKING**: RadarrClient now operates in DATABASE ONLY mode +- Completely eliminated Radarr API usage for movie lookups and import date detection +- All movie operations now use direct database queries exclusively +- Debug endpoints updated to use database-only methods +- Enhanced error messaging when database access is not configured + +### Fixed +- Fixed debug endpoint still calling API methods despite database availability +- Removed all API fallback mechanisms for true database-only operation + ## [0.5.0] - 2025-09-08 ### Added diff --git a/VERSION b/VERSION index 8f0916f..4b9fcbe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/nfoguard.py b/nfoguard.py index 6460712..1f6dec4 100644 --- a/nfoguard.py +++ b/nfoguard.py @@ -864,24 +864,16 @@ async def debug_movie_import_date(imdb_id: str): _log("INFO", f"Found movie: {movie_title} (Radarr ID: {movie_id})") - # Get import date with detailed logging - use the optimized method - import_date = radarr_client.earliest_import_event_optimized(movie_id) - if import_date: - source = "radarr:history.import.optimized" - else: - # Fallback to file dateAdded - import_date = radarr_client.earliest_file_dateadded(movie_id) - source = "radarr:file.dateAdded" if import_date else "no_date_found" + # Get import date with detailed logging - DATABASE ONLY + import_date, source = radarr_client.get_movie_import_date(movie_id, fallback_to_file_date=True) - # Get movie files - movie_files = radarr_client.movie_files(movie_id) + # Movie files info - DATABASE ONLY mode (minimal info) file_info = [] - for f in movie_files: + if import_date: file_info.append({ - "id": f.get("id"), - "relativePath": f.get("relativePath"), - "dateAdded": f.get("dateAdded"), - "quality": f.get("quality", {}).get("quality", {}).get("name", "Unknown") + "note": "DATABASE ONLY MODE - File details from database queries", + "import_date_used": import_date, + "source": source }) return { @@ -991,8 +983,8 @@ async def debug_movie_history(imdb_id: str): "full_data": event_data }) - # Find what our algorithm would pick - picked_date = radarr_client.earliest_import_event_optimized(movie_id) + # Find what our algorithm would pick - DATABASE ONLY + picked_date, _ = radarr_client.get_movie_import_date(movie_id, fallback_to_file_date=True) return { "imdb_id": imdb_id,