Create ComicInfo Metadata files on chapter download (#8033)

* generate ComicInfo files at the chapter root and inside CBZ archives on chapter download.

* Update app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt

Co-authored-by: Andreas <andreas.everos@gmail.com>

* Improvements suggested by @ghostbear

* now creates ComicInfo files in normal chapter folders as well
use manga directly instead of converting it to SManga
truncate old files before overwriting them

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

* remove empty line after resolving merge conflict

* fixes Serializer for class 'ComicInfo' is not found error

* some changes to comments and variable names

* Revert leftover changes to archiveChapter() function

* minor cleanup

* Changed Chapter to SChapter

Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
This commit is contained in:
Shamicen
2022-11-11 22:16:37 +01:00
committed by GitHub
parent a8eebd824a
commit 4e628fe6de
4 changed files with 126 additions and 1 deletions

View File

@@ -269,6 +269,16 @@ class LocalSource(
.joinToString(", ") { it.trim() }
.takeIf { it.isNotEmpty() }
?.let { manga.artist = it }
manga.status = when (comicInfo.publishingStatusTachiyomi?.value) {
"Ongoing" -> SManga.ONGOING
"Completed" -> SManga.COMPLETED
"Licensed" -> SManga.LICENSED
"Publishing finished" -> SManga.PUBLISHING_FINISHED
"Cancelled" -> SManga.CANCELLED
"On hiatus" -> SManga.ON_HIATUS
else -> SManga.UNKNOWN
}
}
@Serializable