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
@@ -43,6 +43,8 @@ import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
import eu.kanade.tachiyomi.util.system.isDevFlavor
import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory
import kotlinx.serialization.json.Json
import nl.adaptivity.xmlutil.XmlDeclMode
import nl.adaptivity.xmlutil.core.XmlVersion
import nl.adaptivity.xmlutil.serialization.UnknownChildHandler
import nl.adaptivity.xmlutil.serialization.XML
import uy.kohesive.injekt.api.InjektModule
@@ -106,6 +108,9 @@ class AppModule(val app: Application) : InjektModule {
XML {
unknownChildHandler = UnknownChildHandler { _, _, _, _, _ -> emptyList() }
autoPolymorphic = true
xmlDeclMode = XmlDeclMode.Charset
indent = 4
xmlVersion = XmlVersion.XML10
}
}