update to db call

This commit is contained in:
2025-09-08 18:00:50 -04:00
parent 935307a74d
commit 19b40c0fd5
3 changed files with 23 additions and 18 deletions
+13
View File
@@ -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
+1 -1
View File
@@ -1 +1 @@
0.5.0
0.5.1
+9 -17
View File
@@ -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,