mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
parent
dbfb3391dc
commit
99f800ce8f
1 changed files with 4 additions and 3 deletions
|
|
@ -68,11 +68,12 @@ class MediaDao(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun insertPages(dsl: DSLContext, media: Media) {
|
private fun insertPages(dsl: DSLContext, media: Media) {
|
||||||
media.pages.forEach {
|
media.pages.forEachIndexed { index, page ->
|
||||||
dsl.insertInto(p)
|
dsl.insertInto(p)
|
||||||
.set(p.BOOK_ID, media.bookId)
|
.set(p.BOOK_ID, media.bookId)
|
||||||
.set(p.FILE_NAME, it.fileName)
|
.set(p.FILE_NAME, page.fileName)
|
||||||
.set(p.MEDIA_TYPE, it.mediaType)
|
.set(p.MEDIA_TYPE, page.mediaType)
|
||||||
|
.set(p.NUMBER, index)
|
||||||
.execute()
|
.execute()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue