39 lines
1.9 KiB
Markdown
39 lines
1.9 KiB
Markdown
# Browser Extension
|
|
- Content Script — YouTube-DOM auslesen, Videodaten extrahieren
|
|
- Background Script — Daten gruppiert an Server senden (POST /videos)
|
|
- Popup — Profil vom Server laden und auswaehlen
|
|
# Server
|
|
## API
|
|
- POST /videos — Video-Batch empfangen, Duplikate entfernen, Profil zuordnen
|
|
- GET /videos — alle Videos abrufen (optional nach Profil filtern)
|
|
- GET /profiles — alle Profile abrufen
|
|
- GET /videos/downloaded — heruntergeladene Videos abrufen (optional nach Profil filtern)
|
|
- DELETE /videos?profile_id=X&exclude_ids= — Videos des Profils loeschen (ausser lokal gespeicherte)
|
|
- POST /videos/{id}/download — Download triggern
|
|
- GET /videos/{id}/stream — Video streamen
|
|
- GET /videos/{id}/file — Video-Datei zum Download ausliefern
|
|
- DELETE /videos/{id}/file — Server-Datei loeschen (nach lokalem Download)
|
|
- WS /ws — WebSocket, benachrichtigt Clients bei neuen Videos
|
|
## Services
|
|
- VideoService — Videos speichern, abrufen, Status verwalten
|
|
- DownloadService — yt-dlp aufrufen, Video herunterladen
|
|
- StreamService — Live-Streaming via yt-dlp + ffmpeg
|
|
## Model
|
|
- Video — id, title, youtuber, thumbnail_url, youtube_url, file_path
|
|
- Profile — id, name
|
|
- video_profiles — video_id, profile_id (Many-to-Many)
|
|
# App
|
|
## Screens
|
|
- AllVideosScreen — alle Videos als Cards
|
|
- DownloadedVideosScreen — heruntergeladene Videos als Cards
|
|
- VideoDetailScreen — Starten, Download, Zurück, Löschen
|
|
- VideoPlayerScreen — Player mit Standard-Controls
|
|
## ViewModel
|
|
- VideoViewModel — Video-State verwalten, API-Aufrufe triggern, lokal bevorzugen sonst streamen
|
|
## Services
|
|
- LocalStorageService — Videos lokal speichern, pruefen, loeschen
|
|
## API
|
|
- ServerApi — kommuniziert mit FastAPI (GET /profiles, GET /videos, POST /download, GET /stream, GET /videos/{id}/file, DELETE /videos/{id}/file, DELETE /videos)
|
|
## Model
|
|
- Video — id, title, youtuber, thumbnailUrl, youtubeUrl, isDownloaded, localFilePath, profileIds
|
|
- Profile — id, name |