Add ComicInfo.xml to cbz file. Close #333

This commit is contained in:
2025-04-21 20:03:43 +08:00
parent ea99e87afb
commit 7bdab7ade7
3 changed files with 72 additions and 20 deletions

View File

@@ -306,7 +306,8 @@ class _LocalComicsPageState extends State<LocalComicsPage> {
});
} else {
// prevent dirty data
var comic = LocalManager().find(c.id, ComicType.fromKey(c.sourceKey))!;
var comic =
LocalManager().find(c.id, ComicType.fromKey(c.sourceKey))!;
comic.read();
}
},
@@ -444,7 +445,10 @@ class _LocalComicsPageState extends State<LocalComicsPage> {
var fileName = "";
// For each comic, export it to a file
for (var comic in comics) {
fileName = FilePath.join(cacheDir, sanitizeFileName(comic.title) + ext);
fileName = FilePath.join(
cacheDir,
sanitizeFileName(comic.title, maxLength: 100) + ext,
);
await export(comic, fileName);
current++;
if (comics.length > 1) {