Serie Context Menu
This commit is contained in:
@@ -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,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,3 +1,4 @@
|
||||
// ignore: constant_identifier_names
|
||||
enum ItemStatus { Init, Progress, Done }
|
||||
|
||||
ItemStatus statusFromString(String? s) {
|
||||
|
||||
Reference in New Issue
Block a user