diff --git a/komga-webui/src/components/PageHashMatchesTable.vue b/komga-webui/src/components/PageHashMatchesTable.vue index 361d92f6f..3ac1cc870 100644 --- a/komga-webui/src/components/PageHashMatchesTable.vue +++ b/komga-webui/src/components/PageHashMatchesTable.vue @@ -67,6 +67,7 @@ export default Vue.extend({ headers(): object[] { return [ {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').toString(), value: 'bookId'}, ] diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index d61549efa..e50ba6c06 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -190,6 +190,7 @@ "dismiss": "Dismiss", "download": "Download", "email": "Email", + "filename": "Filename", "filter_no_matches": "The active filter has no matches", "genre": "Genre", "go_to_library": "Go to library", diff --git a/komga-webui/src/types/komga-pagehashes.ts b/komga-webui/src/types/komga-pagehashes.ts index 51c30f6f8..d73fae87f 100644 --- a/komga-webui/src/types/komga-pagehashes.ts +++ b/komga-webui/src/types/komga-pagehashes.ts @@ -6,8 +6,9 @@ export interface PageHashUnknownDto { matchCount: number, } -export interface PageHashMatchDto{ +export interface PageHashMatchDto { bookId: string, url: string, pageNumber: number, + fileName: string, } diff --git a/komga/src/main/kotlin/org/gotson/komga/domain/model/PageHashMatch.kt b/komga/src/main/kotlin/org/gotson/komga/domain/model/PageHashMatch.kt index 291146ecb..eadd3b3ef 100644 --- a/komga/src/main/kotlin/org/gotson/komga/domain/model/PageHashMatch.kt +++ b/komga/src/main/kotlin/org/gotson/komga/domain/model/PageHashMatch.kt @@ -6,4 +6,5 @@ data class PageHashMatch( val bookId: String, val url: URL, val pageNumber: Int, + val fileName: String, ) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/PageHashDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/PageHashDao.kt index 22dee148a..241d1032f 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/PageHashDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/PageHashDao.kt @@ -69,7 +69,7 @@ class PageHashDao( } override fun findMatchesByHash(pageHash: PageHashUnknown, pageable: Pageable): Page { - 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) .leftJoin(b).on(p.BOOK_ID.eq(b.ID)) .where(p.FILE_HASH.eq(pageHash.hash)) @@ -90,6 +90,7 @@ class PageHashDao( bookId = it.value1(), url = URL(it.value2()), pageNumber = it.value3() + 1, + fileName = it.value4(), ) } diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashMatchDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashMatchDto.kt index 4c30c2dda..e039c32ed 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashMatchDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashMatchDto.kt @@ -7,6 +7,7 @@ data class PageHashMatchDto( val bookId: String, val url: String, val pageNumber: Int, + val fileName: String, ) fun PageHashMatch.toDto() = @@ -14,4 +15,5 @@ fun PageHashMatch.toDto() = bookId = bookId, url = url.toFilePath(), pageNumber = pageNumber, + fileName = fileName, )