Film / Serie Update

This commit is contained in:
2025-10-30 20:48:22 +01:00
parent 6ec3ad363c
commit dd21a3ed71
6 changed files with 456 additions and 10 deletions
+14 -2
View File
@@ -161,8 +161,9 @@ class BackendApi {
return (map['items'] as List).cast<Map<String, dynamic>>();
}
Future<void> upsertShow(Map<String, dynamic> tmdbJson) async {
await _post({'action': 'upsert_show', 'tmdb': tmdbJson});
Future<int> upsertShow(Map<String, dynamic> tmdbJson) async {
final map = await _post({'action': 'upsert_show', 'tmdb': tmdbJson});
return (map['id'] as num).toInt();
}
Future<int> upsertSeason(int showId, Map<String, dynamic> seasonJson) async {
@@ -187,6 +188,17 @@ class BackendApi {
return v == null ? null : (v as num).toInt();
}
Future<List<Map<String, dynamic>>> listShows() async {
final map = await _post({'action': 'list_shows'});
return (map['items'] as List).cast<Map<String, dynamic>>();
}
Future<int?> getTmdbIdByShowId(int showId) async {
final map = await _post({'action': 'get_tmdb_by_show_id', 'show_id': showId});
final v = map['tmdb_id'];
return v == null ? null : (v as num).toInt();
}
Future<void> setShowMeta({
required int showId,
String? resolution,