diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index e50ba6c06..e8f6b2589 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -534,7 +534,8 @@ "action_ignore": "Ignore", "matches_n": "No matches | 1 match | {count} matches", "title": "Duplicate pages", - "unknown_size": "Unknown size" + "unknown_size": "Unknown size", + "delete_to_save": "Delete to save {size}" }, "duplicates": { "file_hash": "File hash", diff --git a/komga-webui/src/types/komga-pagehashes.ts b/komga-webui/src/types/komga-pagehashes.ts index d73fae87f..3c1c688b2 100644 --- a/komga-webui/src/types/komga-pagehashes.ts +++ b/komga-webui/src/types/komga-pagehashes.ts @@ -3,6 +3,7 @@ export interface PageHashUnknownDto { mediaType: string, sizeBytes?: number, size?: string, + totalSize?: string, matchCount: number, } diff --git a/komga-webui/src/views/SettingsDuplicatePages.vue b/komga-webui/src/views/SettingsDuplicatePages.vue index 875fdc327..c9ebd1e90 100644 --- a/komga-webui/src/views/SettingsDuplicatePages.vue +++ b/komga-webui/src/views/SettingsDuplicatePages.vue @@ -31,14 +31,21 @@
{{ element.mediaType }}
{{ element.size || $t('duplicate_pages.unknown_size') }}
+ {{ $tc('duplicate_pages.matches_n', element.matchCount) }} + +
{{ $t('duplicate_pages.delete_to_save', {size: element.totalSize}) }} +
diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashUnknownDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashUnknownDto.kt index b3defbe7c..77a9f414b 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashUnknownDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageHashUnknownDto.kt @@ -8,6 +8,7 @@ data class PageHashUnknownDto( val mediaType: String, val sizeBytes: Long?, val size: String? = sizeBytes?.let { BinaryByteUnit.format(it) }, + val totalSize: String ? = sizeBytes?.let { BinaryByteUnit.format(it * matchCount) }, val matchCount: Int, )