Fixed crash caused by empty chapter list.

This commit is contained in:
2025-02-23 20:24:43 +08:00
parent 587c5d8040
commit fd19f6bf7d
2 changed files with 4 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ abstract class CBZ {
tags: metaData.tags,
comicType: ComicType.local,
directory: dest.name,
chapters: ComicChapters.fromJson(cpMap),
chapters: ComicChapters.fromJsonOrNull(cpMap),
downloadedChapters: cpMap?.keys.toList() ?? [],
cover: 'cover.${coverFile.extension}',
createdAt: DateTime.now(),