Files
MediaManager/media_manager/common/schemas.py
Maximilian Dorninger 25cd4b0724 Refactor tv and movies (#526)
This PR refactors the movie and tv modules and adds a "common" module
for shared logic.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Dedicated import and metadata services for movies and TV;
completed-torrent detection and import flows.

* **Refactor**
* Shared media schemas, models, repository logic and base services
consolidated; movie/TV services and routes now delegate to specialised
import/metadata services.

* **Bug Fixes**
  * Fixed TV episode-count method name.

* **Chores**
  * Added .DS_Store to ignore list; added module comment.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-07 14:18:29 +02:00

34 lines
734 B
Python

import uuid
from uuid import UUID
from pydantic import BaseModel, ConfigDict, Field
from media_manager.torrent.models import Quality
class BaseMedia(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: UUID = Field(default_factory=uuid.uuid4)
name: str
overview: str
year: int | None
external_id: int
metadata_provider: str
library: str = "Default"
original_language: str | None = None
imdb_id: str | None = None
class BaseMediaFile(BaseModel):
model_config = ConfigDict(from_attributes=True)
quality: Quality
torrent_id: UUID | None = None
file_path_suffix: str
class PublicMediaFile(BaseMediaFile):
downloaded: bool = False
imported: bool = False