Melo v2.10 - YouTube Proxy, Download-Screen, Logger, iOS

This commit is contained in:
Hermes (Server)
2026-07-26 14:24:10 +02:00
parent b4baef5875
commit 3e9389ab59
17 changed files with 1065 additions and 347 deletions
+10 -2
View File
@@ -20,7 +20,7 @@ class DbHelper {
final pfad = await getDatabasesPath();
return openDatabase(
p.join(pfad, 'melo.db'),
version: 1,
version: 2,
onCreate: (db, version) async {
await db.execute('''
CREATE TABLE songs (
@@ -35,6 +35,7 @@ class DbHelper {
ist_heruntergeladen INTEGER DEFAULT 0,
hinzugefuegt_am TEXT NOT NULL,
download_quelle TEXT DEFAULT 'local',
stream_url TEXT,
zuletzt_position INTEGER
)
''');
@@ -83,7 +84,14 @@ class DbHelper {
''');
},
onUpgrade: (db, oldVersion, newVersion) async {
// Hier zukünftige DB-Migrationen einpflegen (z.B. if (oldVersion < 2) ...)
if (oldVersion < 2) {
try {
await db.execute('ALTER TABLE songs ADD COLUMN stream_url TEXT');
} catch (_) {
// Spalte existiert bereits ignorieren
}
}
// Weitere Migrationen: if (oldVersion < 3) { ... }
},
);
}