mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 04:22:28 +02:00
fix(webui): duplicate page matches show filenames
This commit is contained in:
parent
5844521286
commit
388c4f5f30
6 changed files with 9 additions and 2 deletions
|
|
@ -67,6 +67,7 @@ export default Vue.extend({
|
||||||
headers(): object[] {
|
headers(): object[] {
|
||||||
return [
|
return [
|
||||||
{text: this.$t('common.url').toString(), value: 'url'},
|
{text: this.$t('common.url').toString(), value: 'url'},
|
||||||
|
{text: this.$t('common.filename').toString(), value: 'fileName'},
|
||||||
{text: this.$t('common.page_number').toString(), value: 'pageNumber'},
|
{text: this.$t('common.page_number').toString(), value: 'pageNumber'},
|
||||||
{text: this.$t('common.page').toString(), value: 'bookId'},
|
{text: this.$t('common.page').toString(), value: 'bookId'},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@
|
||||||
"dismiss": "Dismiss",
|
"dismiss": "Dismiss",
|
||||||
"download": "Download",
|
"download": "Download",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
|
"filename": "Filename",
|
||||||
"filter_no_matches": "The active filter has no matches",
|
"filter_no_matches": "The active filter has no matches",
|
||||||
"genre": "Genre",
|
"genre": "Genre",
|
||||||
"go_to_library": "Go to library",
|
"go_to_library": "Go to library",
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@ export interface PageHashUnknownDto {
|
||||||
matchCount: number,
|
matchCount: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PageHashMatchDto{
|
export interface PageHashMatchDto {
|
||||||
bookId: string,
|
bookId: string,
|
||||||
url: string,
|
url: string,
|
||||||
pageNumber: number,
|
pageNumber: number,
|
||||||
|
fileName: string,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@ data class PageHashMatch(
|
||||||
val bookId: String,
|
val bookId: String,
|
||||||
val url: URL,
|
val url: URL,
|
||||||
val pageNumber: Int,
|
val pageNumber: Int,
|
||||||
|
val fileName: String,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class PageHashDao(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun findMatchesByHash(pageHash: PageHashUnknown, pageable: Pageable): Page<PageHashMatch> {
|
override fun findMatchesByHash(pageHash: PageHashUnknown, pageable: Pageable): Page<PageHashMatch> {
|
||||||
val query = dsl.select(p.BOOK_ID, b.URL, p.NUMBER)
|
val query = dsl.select(p.BOOK_ID, b.URL, p.NUMBER, p.FILE_NAME)
|
||||||
.from(p)
|
.from(p)
|
||||||
.leftJoin(b).on(p.BOOK_ID.eq(b.ID))
|
.leftJoin(b).on(p.BOOK_ID.eq(b.ID))
|
||||||
.where(p.FILE_HASH.eq(pageHash.hash))
|
.where(p.FILE_HASH.eq(pageHash.hash))
|
||||||
|
|
@ -90,6 +90,7 @@ class PageHashDao(
|
||||||
bookId = it.value1(),
|
bookId = it.value1(),
|
||||||
url = URL(it.value2()),
|
url = URL(it.value2()),
|
||||||
pageNumber = it.value3() + 1,
|
pageNumber = it.value3() + 1,
|
||||||
|
fileName = it.value4(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ data class PageHashMatchDto(
|
||||||
val bookId: String,
|
val bookId: String,
|
||||||
val url: String,
|
val url: String,
|
||||||
val pageNumber: Int,
|
val pageNumber: Int,
|
||||||
|
val fileName: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun PageHashMatch.toDto() =
|
fun PageHashMatch.toDto() =
|
||||||
|
|
@ -14,4 +15,5 @@ fun PageHashMatch.toDto() =
|
||||||
bookId = bookId,
|
bookId = bookId,
|
||||||
url = url.toFilePath(),
|
url = url.toFilePath(),
|
||||||
pageNumber = pageNumber,
|
pageNumber = pageNumber,
|
||||||
|
fileName = fileName,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue