Files
rippy/docker/worker/tasks.py
T
Hitonabi 0ea5f10b31
Ampel / ampel (push) Failing after 12m31s
Fix-Runde nach Review: alle Befunde behoben + echte Tests
- Metadaten-Preview WIEDERHERGESTELLT (Stub ueberschattete echte
  prescan-Implementierung), tote Altmodule geloescht
- Celery update_state statt Phantom-Task/erfundener API
- abcde-Kommando korrigiert (CD-Ripping war nie funktionsfaehig)
- JWT: fester Schluessel Pflicht, echtes Logout, Cleanup nur Abgelaufene
- main.py: crashende Endpoints (Path/secrets/api_keys), year-Bug,
  Admin-Login aus .env
- Ruff gruen (29 Funde), Tests: auth/cache_keys/ripping_helpers,
  Placebo-test_health raus
- SAVEPOINT: offene MakeMKV-Entscheidung SICHTBAR gemacht (Regel B)
2026-07-22 19:31:48 +02:00

25 lines
782 B
Python

from celery_app import celery_app
from ripping import rip_dvd, rip_bluray, rip_cd, detect_disc_type
@celery_app.task(bind=True, name="worker.tasks.rip_disc")
def rip_disc(self, device_path: str, disc_id: str = None):
"""Rippt eine Disc basierend auf ihrem Typ."""
disc_type = detect_disc_type(device_path)
if not disc_id:
disc_id = device_path.replace("/", "_")
if disc_type == "cd":
return rip_cd(device_path, disc_id)
elif disc_type == "dvd":
return rip_dvd(device_path, disc_id)
elif disc_type == "bluray":
return rip_bluray(device_path, disc_id)
else:
return {
"status": "error",
"message": f"Unbekannter Disc-Typ: {disc_type}",
"disc_type": disc_type
}