addactor, addtag dialogs
This commit is contained in:
1 parent
b0f913f8d1
commit
405d7e420e
10 files changed
+302
-64
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import '../types/actor.dart';
|
||||
import 'api.dart';
|
||||
|
||||
Future<List<Actor>> loadAllActors() async {
|
||||
final data = await API.query("actor", "getAllActors", {});
|
||||
|
||||
final d = (jsonDecode(data) ?? []) as List<dynamic>;
|
||||
final actors = d.map((e) => Actor.fromJson(e)).toList(growable: false);
|
||||
return actors;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import '../types/video_data.dart';
|
||||
import 'api.dart';
|
||||
|
||||
Future<VideoData> loadVideoData(int videoId) async {
|
||||
final data = await API.query("video", "loadVideo", {'MovieId': videoId});
|
||||
|
||||
final d = jsonDecode(data);
|
||||
final video = VideoData.fromJson(d);
|
||||
return video;
|
||||
}
|
||||
Reference in new issue
Block a user