This repository has been archived on 2026-11-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
videovault/app/web/routing.py
T
adminandClaude Opus 5 d209ccd8fe Arkivera VideoVault från laptop till SIAX-flottan
Kod från /home/simon/Documents/Default Project/videovault (Python: yt-dlp +
ffmpeg + SQLite FTS5 + Meilisearch + FastAPI). Runtime-data (.venv, data/,
watch/, *.db, meili-data) exkluderad. Utökad .gitignore (secrets/cookies/media),
referenskopior av systemd-user-units i deploy/systemd/, README-sektion
Driftsläge: appen saknar auth och får inte exponeras utan auth.

Ej deployad. Laptop-tjänsterna vv-web/vv-worker är avaktiverade.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-17 19:36:31 +02:00

7 lines
307 B
Python

def media_url(v, kind="thumb"):
key = {"video": "optimized_path", "source": "download_path",
"poster": "poster_path", "thumb": "thumb_path",
"preview": "preview_path"}.get(kind, "thumb_path")
if not v or not v.get(key):
return None
return f"/media/{v['id']}/{kind}"