Initial commit: Phase 1 – Projektstruktur, DB-Schema, Core-API
- FastAPI-Backend mit vollständiger ABS v2.x API-Kompatibilität - SQLAlchemy-Models: User, Library, LibraryItem, BookFile, Chapter, Podcast, PodcastEpisode, MediaProgress, Bookmark, PlaybackSession - Auth: JWT-Login (/login, /logout, /api/authorize) - Library + Items Endpoints inkl. camelCase ABS-Response-Format - HLS-Streaming via FFmpeg (POST /api/items/:id/play, Session-Sync) - Me/Progress Endpoints + Lesezeichen - User-Management + Server-Settings (Admin) - Library-Scanner (MP3/WAV Discovery, Hintergrund-Task) - File Watcher (watchdog, 30s Debounce) - Matching-Skelett (MusicBrainz, OpenLibrary, Google Books – Phase 5) - Docker-Setup: backend (Python 3.12+FFmpeg), frontend (React/Vite), nginx Reverse-Proxy auf Port 3000 - setup.sh: Installiert Docker auf Debian/Ubuntu, richtet .env ein Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
55
backend/app/schemas/podcast.py
Normal file
55
backend/app/schemas/podcast.py
Normal file
@@ -0,0 +1,55 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from pydantic.alias_generators import to_camel
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class PodcastEpisodeOut(BaseModel):
|
||||
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
||||
id: str
|
||||
index: int = 0
|
||||
season: str | None = None
|
||||
episode: str | None = None
|
||||
episode_type: str = "full"
|
||||
title: str | None = None
|
||||
subtitle: str | None = None
|
||||
description: str | None = None
|
||||
enclosure: dict | None = None
|
||||
pub_date: str | None = None
|
||||
audio_file: dict | None = None
|
||||
published_at: int | None = None
|
||||
added_at: int = 0
|
||||
updated_at: int = 0
|
||||
duration: float = 0.0
|
||||
size: int = 0
|
||||
|
||||
|
||||
class PodcastMetadata(BaseModel):
|
||||
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
||||
title: str | None = None
|
||||
author: str | None = None
|
||||
description: str | None = None
|
||||
release_date: str | None = None
|
||||
genres: list[str] = []
|
||||
feed_url: str | None = None
|
||||
image_url: str | None = None
|
||||
itunes_page_url: str | None = None
|
||||
itunes_id: int | None = None
|
||||
itunes_artist_id: int | None = None
|
||||
explicit: bool = False
|
||||
language: str | None = None
|
||||
type: str = "episodic"
|
||||
|
||||
|
||||
class PodcastOut(BaseModel):
|
||||
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
||||
library_item_id: str
|
||||
metadata: PodcastMetadata
|
||||
cover_path: str | None = None
|
||||
tags: list[str] = []
|
||||
episodes: list[PodcastEpisodeOut] = []
|
||||
auto_download_episodes: bool = False
|
||||
auto_download_schedule: str = "0 * * * *"
|
||||
last_episode_check: int | None = None
|
||||
max_episodes_to_keep: int = 0
|
||||
max_new_episodes_to_download: int = 3
|
||||
num_episodes: int = 0
|
||||
Reference in New Issue
Block a user