fix: Language not being used

This commit is contained in:
Ahmad Ansori Palembani 2024-05-29 09:23:55 +07:00
parent 6bf37b36c3
commit 0846e48d6a
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 4 additions and 3 deletions

View file

@ -220,6 +220,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
xml.decodeFromReader<ComicInfo>(it)
}
comicInfo.language?.let { langMap[manga.url] = it.value }
manga.copyFromComicInfo(comicInfo)
}
@ -243,7 +244,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
lang?.let { langMap[manga.url] = it }
val file = directory.createFile(COMIC_INFO_FILE)!!
file.writeText(xml.encodeToString(ComicInfo.serializer(), manga.toComicInfo()))
file.writeText(xml.encodeToString(ComicInfo.serializer(), manga.toComicInfo(lang)))
}
@Serializable