mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Extended Rekordbox support
This commit is contained in:
1 parent
010f67cd2d
commit
43e712afbd
17 files changed
+837
-100
No files matched your search
@@ -18,6 +18,7 @@ Two rules keep this honest:
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Protocol, runtime_checkable
|
||||
|
||||
@@ -26,6 +27,28 @@ from .model import Facets, PlaylistNode, Stats, Track, TrackCues, TrackPage
|
||||
from .pathmap import PathMapping
|
||||
|
||||
|
||||
@dataclass
|
||||
class SaveOutcome:
|
||||
"""What a save produced, in terms every platform can answer.
|
||||
|
||||
Promoted here once a second adapter needed it (the two-platform rule). The
|
||||
fields are deliberately optional because platforms differ in kind, not just
|
||||
in detail:
|
||||
|
||||
* `snapshot` is the exact bytes written, for the version-history commit —
|
||||
and it is None on a platform Konduktor does not version. A Rekordbox
|
||||
library is `master.db` plus ~200 analysis files plus a playlist XML, so
|
||||
there is no single blob that *is* the library, and restoring the database
|
||||
alone would roll back the app's own auth and sampler state.
|
||||
* `tag_results` reports embedded audio-file tag writes, which only a
|
||||
platform that does them will populate.
|
||||
"""
|
||||
|
||||
summary: str # human-readable edit summary, for the version-history message
|
||||
snapshot: bytes | None = None
|
||||
tag_results: list = field(default_factory=list)
|
||||
|
||||
|
||||
class AdapterError(Exception):
|
||||
"""Base for every failure an adapter reports to the HTTP layer."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user