mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:43:28 +02:00
add usenet bool to various schemas/models
This commit is contained in:
@@ -30,6 +30,7 @@ from media_manager.torrent.models import Torrent # noqa: E402
|
||||
from media_manager.tv.models import Show, Season, Episode, SeasonFile, SeasonRequest # noqa: E402
|
||||
from media_manager.movies.models import Movie, MovieFile, MovieRequest # noqa: E402
|
||||
from media_manager.notification.models import Notification # noqa: E402
|
||||
from media_manager.usenet.models import UsenetDownload # noqa: E402
|
||||
|
||||
from media_manager.database import Base # noqa: E402
|
||||
|
||||
@@ -51,6 +52,7 @@ target_metadata = Base.metadata
|
||||
MovieFile,
|
||||
MovieRequest,
|
||||
Notification,
|
||||
UsenetDownload
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class BasicConfig(BaseSettings):
|
||||
tv_directory: Path = "/data/tv"
|
||||
movie_directory: Path = "/data/movies"
|
||||
torrent_directory: Path = "/data/torrents"
|
||||
usenet_directory: Path = "/data/usenet"
|
||||
FRONTEND_URL: AnyHttpUrl = "http://localhost:3000/"
|
||||
CORS_URLS: list[str] = []
|
||||
DEVELOPMENT: bool = False
|
||||
|
||||
@@ -362,6 +362,7 @@ class MovieRepository:
|
||||
quality=torrent.quality,
|
||||
imported=torrent.imported,
|
||||
file_path_suffix=file_path_suffix,
|
||||
usenet=torrent.usenet
|
||||
)
|
||||
formatted_results.append(movie_torrent)
|
||||
return formatted_results
|
||||
|
||||
@@ -83,6 +83,7 @@ class MovieTorrent(BaseModel):
|
||||
quality: Quality
|
||||
imported: bool
|
||||
file_path_suffix: str
|
||||
usenet: bool
|
||||
|
||||
|
||||
class RichMovieTorrent(BaseModel):
|
||||
|
||||
@@ -14,6 +14,7 @@ class Torrent(Base):
|
||||
quality: Mapped[Quality]
|
||||
imported: Mapped[bool]
|
||||
hash: Mapped[str]
|
||||
usenet: Mapped[bool]
|
||||
|
||||
season_files = relationship("SeasonFile", back_populates="torrent")
|
||||
movie_files = relationship("MovieFile", back_populates="torrent")
|
||||
|
||||
@@ -39,3 +39,4 @@ class Torrent(BaseModel):
|
||||
quality: Quality
|
||||
imported: bool
|
||||
hash: str
|
||||
usenet: bool = False
|
||||
|
||||
@@ -117,6 +117,7 @@ class RichSeasonTorrent(BaseModel):
|
||||
status: TorrentStatus
|
||||
quality: Quality
|
||||
imported: bool
|
||||
usenet: bool
|
||||
|
||||
file_path_suffix: str
|
||||
seasons: list[SeasonNumber]
|
||||
|
||||
@@ -364,6 +364,7 @@ class TvService:
|
||||
imported=show_torrent.imported,
|
||||
seasons=seasons,
|
||||
file_path_suffix=file_path_suffix,
|
||||
usenet=show_torrent.usenet,
|
||||
)
|
||||
rich_season_torrents.append(season_torrent)
|
||||
return RichShowTorrent(
|
||||
|
||||
Reference in New Issue
Block a user