Film / Serie Update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user