CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
Mirrors TMDb's own /trending/{movie|tv}/{day|week} ranking rather than
Aurora computing trending itself from popularity deltas -- that would
require re-syncing the entire catalog on a schedule, infeasible at any
real scale, whereas TMDb already computes this well from signals (real
view/search velocity) Aurora has no access to.
New: TrendingEntry model + migration 0003, MetadataProvider.get_trending
(concrete/optional, like aclose(), so existing test fakes don't all need
updating), refresh_trending() which actually ingests each trending item
(only ~20 per window, cheap enough to fully ingest rather than apply the
never-fabricate-a-stub rule recommendations uses), a twice-daily arq cron
job (WorkerSettings.cron_jobs, new to this codebase), a manual admin
trigger for right after a deploy, and GET /movies/trending + GET
/series/trending.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
81 lines
2.1 KiB
Python
81 lines
2.1 KiB
Python
"""SQLAlchemy models.
|
|
|
|
Import every model module here so `Base.metadata` is fully populated for
|
|
Alembic autogeneration and `Base.metadata.create_all()` (used only in
|
|
tests) regardless of which module happens to trigger the import first.
|
|
"""
|
|
|
|
from app.models.artwork import Artwork
|
|
from app.models.base import Base
|
|
from app.models.collection import Collection, CollectionMovie, CollectionRelation, CollectionSeries
|
|
from app.models.company import Company, MovieCompany, SeriesCompany
|
|
from app.models.credit import Credit
|
|
from app.models.external_id import ExternalID
|
|
from app.models.genre import Genre, MovieGenre, SeriesGenre
|
|
from app.models.keyword import Keyword, MovieKeyword, SeriesKeyword
|
|
from app.models.language_country import Certification, Country, Language
|
|
from app.models.movie import (
|
|
Movie,
|
|
MovieAlternateTitle,
|
|
MovieProductionCountry,
|
|
MovieRecommendation,
|
|
MovieSpokenLanguage,
|
|
ReleaseDate,
|
|
)
|
|
from app.models.person import Person
|
|
from app.models.provider import IngestionJob, Provider, ProviderRecord
|
|
from app.models.trending import TrendingEntry
|
|
from app.models.tv import (
|
|
Episode,
|
|
Season,
|
|
Series,
|
|
SeriesAlternateTitle,
|
|
SeriesProductionCountry,
|
|
SeriesSpokenLanguage,
|
|
)
|
|
from app.models.video import Video
|
|
from app.models.watch_provider import WatchProvider, WatchProviderOffering
|
|
|
|
__all__ = [
|
|
"Base",
|
|
"Artwork",
|
|
"Collection",
|
|
"CollectionMovie",
|
|
"CollectionSeries",
|
|
"CollectionRelation",
|
|
"Company",
|
|
"MovieCompany",
|
|
"SeriesCompany",
|
|
"Credit",
|
|
"ExternalID",
|
|
"Genre",
|
|
"MovieGenre",
|
|
"SeriesGenre",
|
|
"Keyword",
|
|
"MovieKeyword",
|
|
"SeriesKeyword",
|
|
"Language",
|
|
"Country",
|
|
"Certification",
|
|
"Movie",
|
|
"MovieAlternateTitle",
|
|
"MovieSpokenLanguage",
|
|
"MovieProductionCountry",
|
|
"ReleaseDate",
|
|
"MovieRecommendation",
|
|
"Person",
|
|
"Provider",
|
|
"ProviderRecord",
|
|
"IngestionJob",
|
|
"Series",
|
|
"SeriesAlternateTitle",
|
|
"SeriesSpokenLanguage",
|
|
"SeriesProductionCountry",
|
|
"Season",
|
|
"Episode",
|
|
"Video",
|
|
"WatchProvider",
|
|
"WatchProviderOffering",
|
|
"TrendingEntry",
|
|
]
|