fix: migrations, auth, providers health check, E2E tests, remove neko-sama
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled

- 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:
Kimi Agent
2026-05-12 11:45:56 +00:00
parent 693615a7dc
commit 520be53901
47 changed files with 654 additions and 3437 deletions
+10 -8
View File
@@ -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