Rewrite meta and add meta mutations (#556)

This commit is contained in:
Mitchell Syer
2023-05-26 06:15:16 -04:00
committed by GitHub
parent 04a671382a
commit 3f91663ecf
20 changed files with 384 additions and 122 deletions

View File

@@ -307,6 +307,12 @@ object Chapter {
val chapterId =
ChapterTable.select { (ChapterTable.manga eq mangaId) and (ChapterTable.sourceOrder eq chapterIndex) }
.first()[ChapterTable.id].value
modifyChapterMeta(chapterId, key, value)
}
}
fun modifyChapterMeta(chapterId: Int, key: String, value: String) {
transaction {
val meta =
ChapterMetaTable.select { (ChapterMetaTable.ref eq chapterId) and (ChapterMetaTable.key eq key) }
.firstOrNull()