cbz import & export

This commit is contained in:
nyne
2024-10-28 22:59:35 +08:00
parent 78c527aa2b
commit 0308e68a44
10 changed files with 319 additions and 17 deletions

View File

@@ -221,7 +221,7 @@ class LocalManager with ChangeNotifier {
if (res.isEmpty) {
return '1';
}
return ((res.first[0] as int) + 1).toString();
return (int.parse((res.first[0])) + 1).toString();
}
Future<void> add(LocalComic comic, [String? id]) async {
@@ -424,7 +424,7 @@ class LocalManager with ChangeNotifier {
void deleteComic(LocalComic c) {
var dir = Directory(FilePath.join(path, c.directory));
dir.deleteSync(recursive: true);
dir.deleteIgnoreError(recursive: true);
remove(c.id, c.comicType);
notifyListeners();
}