Add feature to download all comics in a folder

This commit is contained in:
2024-11-13 16:20:42 +08:00
parent 6f2bac52e4
commit 71b03d744a
5 changed files with 43 additions and 8 deletions

View File

@@ -365,10 +365,10 @@ class LocalManager with ChangeNotifier {
return files.map((e) => "file://${e.path}").toList();
}
Future<bool> isDownloaded(String id, ComicType type, int ep) async {
Future<bool> isDownloaded(String id, ComicType type, [int? ep]) async {
var comic = find(id, type);
if (comic == null) return false;
if (comic.chapters == null) return true;
if (comic.chapters == null || ep == null) return true;
return comic.downloadedChapters
.contains(comic.chapters!.keys.elementAt(ep-1));
}