diff --git a/main.py b/main.py index 44a2a03..a3e2d49 100644 --- a/main.py +++ b/main.py @@ -2088,9 +2088,7 @@ async def check_watchlist_item( raise except Exception as e: logger.error(f"Error checking watchlist item: {e}", exc_info=True) - except Exception as e: - logger.error(f"Error checking watchlist item: {e}", exc_info=True) - raise HTTPException(status_code=500, detail=str(e)) + raise HTTPException(status_code=500, detail=str(e)) @app.post("/api/watchlist/{item_id}/download-all", tags=["Watchlist"]) @@ -2104,7 +2102,6 @@ async def download_all_episodes( if not item: raise HTTPException(status_code=404, detail="Watchlist item not found") - # Check ownership if item.user_id != current_user.id: raise HTTPException(status_code=403, detail="Access denied") @@ -2121,7 +2118,6 @@ async def download_all_episodes( "result": result } finally: - # Restore original value (the check will update it) item.last_episode_downloaded = original_last_episode watchlist_manager.db.commit() except HTTPException: @@ -2131,9 +2127,7 @@ async def download_all_episodes( raise HTTPException(status_code=500, detail=str(e)) - @app.post("/api/watchlist/{item_id}/pause", response_model=WatchlistItem, tags=["Watchlist"]) -TB|@app.post("/api/watchlist/{item_id}/pause", response_model=WatchlistItem, tags=["Watchlist"]) @app.post("/api/watchlist/{item_id}/pause", response_model=WatchlistItem, tags=["Watchlist"])