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:
@@ -62,5 +62,24 @@ class UserInDB(User):
|
||||
"""Schema for user stored in database (with hashed password)"""
|
||||
hashed_password: str
|
||||
|
||||
|
||||
class RefreshTokenTable(SQLModel, table=True):
|
||||
"""Database table for refresh tokens"""
|
||||
__tablename__ = "refresh_tokens"
|
||||
|
||||
id: str = Field(
|
||||
default_factory=lambda: str(uuid.uuid4()),
|
||||
primary_key=True,
|
||||
index=True,
|
||||
nullable=False
|
||||
)
|
||||
token_id: str = Field(index=True, unique=True)
|
||||
username: str = Field(index=True)
|
||||
created_at: datetime = Field(default_factory=datetime.now)
|
||||
expires_at: Optional[datetime] = None
|
||||
revoked: bool = Field(default=False)
|
||||
revoked_at: Optional[datetime] = None
|
||||
|
||||
|
||||
# Import WatchlistItemTable here to resolve SQLModel Relationship mappings
|
||||
from .watchlist import WatchlistItemTable
|
||||
|
||||
@@ -32,7 +32,7 @@ class AppSettingsBase(SQLModel):
|
||||
def disabled_providers(self) -> List[str]:
|
||||
try:
|
||||
return json.loads(self.disabled_providers_json or "[]")
|
||||
except:
|
||||
except json.JSONDecodeError:
|
||||
return []
|
||||
|
||||
@disabled_providers.setter
|
||||
|
||||
@@ -160,7 +160,7 @@ class SonarrMapping(BaseModel):
|
||||
"""Mapping between Sonarr series and anime providers (API model)"""
|
||||
sonarr_series_id: int
|
||||
sonarr_title: str
|
||||
anime_provider: str # 'anime-sama', 'neko-sama', etc.
|
||||
anime_provider: str # 'anime-sama', 'anime-ultime', 'vostfree', 'french-manga', etc.
|
||||
anime_url: str
|
||||
anime_title: str
|
||||
lang: str = "vostfr"
|
||||
|
||||
Reference in New Issue
Block a user