mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 21:00:16 +02:00
fix(api): request param conflict
This commit is contained in:
parent
f25c74f759
commit
160c767c40
5 changed files with 6 additions and 6 deletions
|
|
@ -75,7 +75,7 @@ export function transientBookPageUrl(transientBookId: string, page: number): str
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pageHashUnknownThumbnailUrl(pageHash: PageHashUnknownDto, resize?: number): string {
|
export function pageHashUnknownThumbnailUrl(pageHash: PageHashUnknownDto, resize?: number): string {
|
||||||
let url = `${urls.originNoSlash}/api/v1/page-hashes/unknown/${pageHash.hash}/thumbnail?media_type=${pageHash.mediaType}&size=${pageHash.sizeBytes || -1}`
|
let url = `${urls.originNoSlash}/api/v1/page-hashes/unknown/${pageHash.hash}/thumbnail?media_type=${pageHash.mediaType}&file_size=${pageHash.sizeBytes || -1}`
|
||||||
if(resize) {
|
if(resize) {
|
||||||
url += `&resize=${resize}`
|
url += `&resize=${resize}`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export default class KomgaPageHashesService {
|
||||||
const params = {
|
const params = {
|
||||||
...pageRequest,
|
...pageRequest,
|
||||||
media_type: hash.mediaType,
|
media_type: hash.mediaType,
|
||||||
size: hash.sizeBytes || -1,
|
file_size: hash.sizeBytes || -1,
|
||||||
}
|
}
|
||||||
return (await this.http.get(`${API_PAGE_HASH}/unknown/${hash.hash}`, {
|
return (await this.http.get(`${API_PAGE_HASH}/unknown/${hash.hash}`, {
|
||||||
params: params,
|
params: params,
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ export default Vue.extend({
|
||||||
sortOptions(): SortOption[] {
|
sortOptions(): SortOption[] {
|
||||||
return [
|
return [
|
||||||
{name: this.$t('duplicate_pages.filter.total_size').toString(), key: 'totalSize'},
|
{name: this.$t('duplicate_pages.filter.total_size').toString(), key: 'totalSize'},
|
||||||
{name: this.$t('duplicate_pages.filter.size').toString(), key: 'size'},
|
{name: this.$t('duplicate_pages.filter.size').toString(), key: 'fileSize'},
|
||||||
{name: this.$t('duplicate_pages.filter.count').toString(), key: 'matchCount'},
|
{name: this.$t('duplicate_pages.filter.count').toString(), key: 'matchCount'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class PageHashDao(
|
||||||
private val sorts = mapOf(
|
private val sorts = mapOf(
|
||||||
"hash" to p.FILE_HASH,
|
"hash" to p.FILE_HASH,
|
||||||
"mediatype" to p.MEDIA_TYPE,
|
"mediatype" to p.MEDIA_TYPE,
|
||||||
"size" to p.FILE_SIZE,
|
"fileSize" to p.FILE_SIZE,
|
||||||
"matchCount" to DSL.field("count"),
|
"matchCount" to DSL.field("count"),
|
||||||
"totalSize" to DSL.field("totalSize"),
|
"totalSize" to DSL.field("totalSize"),
|
||||||
"url" to b.URL,
|
"url" to b.URL,
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class PageHashController(
|
||||||
fun getUnknownPageHashMatches(
|
fun getUnknownPageHashMatches(
|
||||||
@PathVariable pageHash: String,
|
@PathVariable pageHash: String,
|
||||||
@RequestParam("media_type") mediaType: String,
|
@RequestParam("media_type") mediaType: String,
|
||||||
@RequestParam("size") size: Long,
|
@RequestParam("file_size") size: Long,
|
||||||
@Parameter(hidden = true) page: Pageable,
|
@Parameter(hidden = true) page: Pageable,
|
||||||
): Page<PageHashMatchDto> =
|
): Page<PageHashMatchDto> =
|
||||||
pageHashRepository.findMatchesByHash(
|
pageHashRepository.findMatchesByHash(
|
||||||
|
|
@ -80,7 +80,7 @@ class PageHashController(
|
||||||
fun getUnknownPageHashThumbnail(
|
fun getUnknownPageHashThumbnail(
|
||||||
@PathVariable pageHash: String,
|
@PathVariable pageHash: String,
|
||||||
@RequestParam("media_type") mediaType: String,
|
@RequestParam("media_type") mediaType: String,
|
||||||
@RequestParam("size") size: Long,
|
@RequestParam("file_size") size: Long,
|
||||||
@RequestParam("resize") resize: Int? = null,
|
@RequestParam("resize") resize: Int? = null,
|
||||||
): ResponseEntity<ByteArray> =
|
): ResponseEntity<ByteArray> =
|
||||||
pageHashLifecycle.getPage(
|
pageHashLifecycle.getPage(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue