This commit is contained in:
+24
-3
@@ -767,8 +767,7 @@ async def bulk_update_source(dependencies: dict, media_type: str, old_source: st
|
||||
async def get_movie_date_options(dependencies: dict, imdb_id: str):
|
||||
"""Get available date options for a movie (Radarr import, digital release, etc.)"""
|
||||
db = dependencies["db"]
|
||||
nfo_manager = dependencies["nfo_manager"]
|
||||
|
||||
|
||||
# Get current movie data
|
||||
movie = db.get_movie_dates(imdb_id)
|
||||
if not movie:
|
||||
@@ -1499,7 +1498,29 @@ def register_web_routes(app, dependencies):
|
||||
@app.get("/api/movies/{imdb_id}/date-options")
|
||||
async def api_movie_date_options(imdb_id: str):
|
||||
return await get_movie_date_options(dependencies, imdb_id)
|
||||
|
||||
|
||||
@app.get("/api/debug/movie/{imdb_id}/raw")
|
||||
async def api_debug_movie_raw(imdb_id: str):
|
||||
"""Get raw database data for a movie for debugging"""
|
||||
db = dependencies["db"]
|
||||
|
||||
try:
|
||||
movie = db.get_movie_dates(imdb_id)
|
||||
|
||||
if not movie:
|
||||
raise HTTPException(status_code=404, detail="Movie not found")
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"raw_data": movie
|
||||
}
|
||||
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
print(f"❌ Error getting movie debug data: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Failed to get debug data: {str(e)}")
|
||||
|
||||
@app.delete("/api/movies/{imdb_id}")
|
||||
async def api_delete_movie(imdb_id: str):
|
||||
"""Delete a movie from the database"""
|
||||
|
||||
Reference in New Issue
Block a user