v2.52 — Favoriten-Sync-Fix: bidirektionaler Merge (lokal↔Server), Toggle-Push sofort, cloud_id-Verdrahtung
This commit is contained in:
@@ -15,7 +15,8 @@ class Song {
|
||||
final String hinzugefuegtAm;
|
||||
final String downloadQuelle; // "local", "youtube", "server"
|
||||
final String? streamUrl; // Für Server-Streaming (Navidrome) – wird bewusst NICHT in der DB persistiert (Auth-Token-Schutz)
|
||||
final String? ytUrl; // YouTube-Quell-URL für Auto-Redownload bei korrupten Songs
|
||||
final String? ytUrl; // YouTube-Quell-URL – NUR Fallback (Datei korrupt + kein Server-Download möglich); wird nicht mehr lokal geschrieben
|
||||
final String? cloudId; // Verknüpfung lokal ↔ Cloud (Server-Song-ID) für bidirektionalen Favoriten-Sync
|
||||
int? zuletztPosition; // Sekunden, für Wiederaufnahme
|
||||
Set<int>? tagIds; // Cache für Tag-Filterung (nicht in DB gespeichert)
|
||||
|
||||
@@ -37,6 +38,7 @@ class Song {
|
||||
this.downloadQuelle = 'local',
|
||||
this.streamUrl,
|
||||
this.ytUrl,
|
||||
this.cloudId,
|
||||
this.zuletztPosition,
|
||||
}) : hinzugefuegtAm = hinzugefuegtAm ?? DateTime.now().toIso8601String();
|
||||
|
||||
@@ -58,6 +60,7 @@ class Song {
|
||||
'download_quelle': downloadQuelle,
|
||||
'stream_url': null, // Token-haltige Stream-URLs nie persistieren (Sicherheit)
|
||||
'yt_url': ytUrl,
|
||||
'cloud_id': cloudId,
|
||||
'zuletzt_position': zuletztPosition,
|
||||
};
|
||||
|
||||
@@ -79,6 +82,7 @@ class Song {
|
||||
downloadQuelle: m['download_quelle'] as String? ?? 'local',
|
||||
streamUrl: m['stream_url'] as String?,
|
||||
ytUrl: m['yt_url'] as String?,
|
||||
cloudId: m['cloud_id'] as String?,
|
||||
zuletztPosition: m['zuletzt_position'] as int?,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user