rippy-ui-modern: API UI Modernisiert & Import-Fixes
- Doppelte Arcane-Einträge behoben (rippy statt Rippy) - Import-Fixes: relative → absolute imports in main.py, cache/__init__.py, prescan/__init__.py, clients/__init__.py - Neue Dateien: cache.py, prescan.py, Settings.tsx - API-Port 8000 in docker-compose.yml gemappt - UI mit Sidebar, Dark Mode, Einstellungen-Tabs Fixes: #2978 (doppelte Einträge), #2888 (Import-Fehler)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""Pre-Scan module."""
|
||||
|
||||
from typing import Dict, Optional
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
|
||||
@dataclass
|
||||
class PreScanResult:
|
||||
"""Result of a pre-scan."""
|
||||
|
||||
title: str
|
||||
year: Optional[int] = None
|
||||
confidence: float = 0.0
|
||||
metadata: Dict = field(default_factory=dict)
|
||||
tracks: list = field(default_factory=list)
|
||||
|
||||
def to_dict(self) -> Dict:
|
||||
"""Convert to dictionary."""
|
||||
return {
|
||||
"title": self.title,
|
||||
"year": self.year,
|
||||
"confidence": self.confidence,
|
||||
"metadata": self.metadata,
|
||||
"tracks": self.tracks
|
||||
}
|
||||
|
||||
|
||||
class PreScan:
|
||||
"""Pre-scan for discs."""
|
||||
|
||||
def scan(self, device_path: str) -> PreScanResult:
|
||||
"""Scan a disc and return metadata."""
|
||||
return PreScanResult(
|
||||
title="Unknown Disc",
|
||||
year=None,
|
||||
confidence=0.0,
|
||||
metadata={},
|
||||
tracks=[]
|
||||
)
|
||||
Reference in New Issue
Block a user