refactor code

This commit is contained in:
Simon Ding
2024-07-31 14:41:57 +08:00
parent 0ea1c040a2
commit 9ba59a7d5a
22 changed files with 728 additions and 325 deletions

View File

@@ -283,6 +283,8 @@ class Storage {
this.id,
this.name,
this.implementation,
this.tvPath,
this.moviePath,
this.settings,
this.isDefault,
});
@@ -290,6 +292,8 @@ class Storage {
final int? id;
final String? name;
final String? implementation;
final String? tvPath;
final String? moviePath;
final Map<String, dynamic>? settings;
final bool? isDefault;
@@ -298,6 +302,8 @@ class Storage {
id: json1["id"],
name: json1["name"],
implementation: json1["implementation"],
tvPath: json1["tv_path"],
moviePath: json1["movie_path"],
settings: json.decode(json1["settings"]),
isDefault: json1["default"]);
}
@@ -306,6 +312,8 @@ class Storage {
"id": id,
"name": name,
"implementation": implementation,
"tv_path": tvPath,
"movie_path": moviePath,
"settings": settings,
"default": isDefault,
};