fix: migrations, auth, providers health check, E2E tests, remove neko-sama
- Add proper Alembic initial migration (0001_initial_schema.py) - Migrate refresh tokens from JSON file to SQLite (RefreshTokenTable) - Remove Neko-Sama provider entirely (redirects to Gupy, not a host) - Fix provider health check always showing UNKNOWN - Run check_all_health() on startup - Fix POST /providers/health/check background task bug - Add HTMX refresh after manual health check trigger - Fix anime search relevance scoring with MIN_RELEVANCE_THRESHOLD=0.5 - Replace bare 'except:' with 'except Exception:' across codebase - Add Playwright E2E test suite (12 tests, auth setup, helpers) - Fix toast container blocking clicks via pointer-events: none - Remove obsolete Jest/Vite test files and config - Clean up obsolete test_watchlist scripts - Update sonarr model comment for active providers
This commit is contained in:
@@ -29,7 +29,6 @@ from app.download_manager import DownloadManager
|
||||
from app.downloaders import (
|
||||
AnimeSamaDownloader,
|
||||
AnimeUltimeDownloader,
|
||||
NekoSamaDownloader,
|
||||
VostfreeDownloader,
|
||||
ZoneTelechargementDownloader,
|
||||
get_downloader,
|
||||
@@ -59,12 +58,10 @@ async def get_providers_health():
|
||||
|
||||
|
||||
@router.post("/providers/health/check")
|
||||
async def trigger_providers_health_check(background_tasks: BackgroundTasks):
|
||||
"""Trigger a manual health check of all providers in the background"""
|
||||
from app.auto_download_scheduler import auto_download_scheduler
|
||||
|
||||
background_tasks.add_task(auto_download_scheduler.trigger_health_check_now)
|
||||
return {"status": "Health check triggered in background"}
|
||||
async def trigger_providers_health_check():
|
||||
"""Trigger a manual health check of all providers"""
|
||||
await providers_manager.check_all_health()
|
||||
return {"status": "ok", "providers": providers_manager.get_all_status()}
|
||||
|
||||
|
||||
def get_download_manager() -> DownloadManager:
|
||||
@@ -136,7 +133,6 @@ async def search_anime_unified(
|
||||
# Legacy providers (already included in providers_manager, but keep for fallback)
|
||||
legacy_downloaders = {
|
||||
"anime-ultime": AnimeUltimeDownloader(),
|
||||
"neko-sama": NekoSamaDownloader(),
|
||||
"vostfree": VostfreeDownloader(),
|
||||
}
|
||||
for pid, dl in legacy_downloaders.items():
|
||||
@@ -196,6 +192,12 @@ async def search_anime_unified(
|
||||
else:
|
||||
item_dict["_relevance_boost"] = 0.3
|
||||
|
||||
# Filter out results with very low relevance
|
||||
MIN_RELEVANCE_THRESHOLD = 0.5
|
||||
if item_dict["_relevance_boost"] < MIN_RELEVANCE_THRESHOLD:
|
||||
logger.debug(f"Filtered low-relevance result '{title}' for query '{q}' (score: {item_dict['_relevance_boost']})")
|
||||
continue
|
||||
|
||||
results[pid].append(item_dict)
|
||||
|
||||
# Prepare enrichment task for top 15 results per provider
|
||||
|
||||
Reference in New Issue
Block a user