Serie Context Menu

This commit is contained in:
2025-11-04 17:33:12 +01:00
parent 982654273b
commit 3086a751ec
11 changed files with 929 additions and 423 deletions
+6 -4
View File
@@ -86,11 +86,10 @@ class BackendApi {
// ignore: avoid_print
final sc = res?.statusCode;
final data = res?.data;
print('Backend HTTP ${sc}. URL: ${_dio.options.baseUrl}, payload: $payload, data: ${data}');
if (map != null && map.containsKey('error')) {
throw Exception('Backend HTTP ${sc}: ${map['error']}');
throw Exception('Backend HTTP $sc: ${map['error']}');
}
throw Exception('Backend HTTP ${sc}: ${data}');
throw Exception('Backend HTTP $sc: $data');
}
if (map == null) {
throw Exception('Backend: Unexpected response format');
@@ -224,5 +223,8 @@ class BackendApi {
final map = await _post({'action': 'get_show_episodes', 'show_id': showId});
return (map['items'] as List).cast<Map<String, dynamic>>();
}
}
Future<void> deleteShow(int showId) async {
await _post({'action': 'delete_show', 'show_id': showId});
}
}
+1
View File
@@ -1,5 +1,6 @@
/// Globale Konfiguration. Standard: von `--dart-define` lesen.
/// Fallbacks sind hilfreich für lokale Tests.
library;
class AppConfig {
static const backendBaseUrl = String.fromEnvironment(
+1
View File
@@ -1,3 +1,4 @@
// ignore: constant_identifier_names
enum ItemStatus { Init, Progress, Done }
ItemStatus statusFromString(String? s) {