From 73196f9be8d018d10d547e83a8edac9355e97989 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 29 Jul 2024 17:31:52 -0500 Subject: [PATCH] Update:Match tab support clicking current value to set it #3200 --- client/components/modals/item/tabs/Match.vue | 79 +++++++++++++++----- 1 file changed, 60 insertions(+), 19 deletions(-) diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index 1c9be063..d11beac0 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -59,49 +59,63 @@
-

{{ $strings.LabelCurrently }} {{ mediaMetadata.title || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.title || '' }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.subtitle || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.subtitle }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.authorName || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.authorName }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.narratorName || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.narratorName }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.description.substr(0, 100) + (mediaMetadata.description.length > 100 ? '...' : '') }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.description.substr(0, 100) + (mediaMetadata.description.length > 100 ? '...' : '') }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.publisher || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.publisher }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.publishedYear }} +

@@ -109,42 +123,54 @@
-

{{ $strings.LabelCurrently }} {{ mediaMetadata.seriesName || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.seriesName }} +

-
+
-

{{ $strings.LabelCurrently }} {{ mediaMetadata.genres.join(', ') }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.genres.join(', ') }} +

-

{{ $strings.LabelCurrently }} {{ media.tags.join(', ') }}

+

+ {{ $strings.LabelCurrently }} {{ media.tags.join(', ') }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.language || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.language }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.isbn || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.isbn }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.asin || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.asin }} +

@@ -152,28 +178,36 @@
-

{{ $strings.LabelCurrently }} {{ mediaMetadata.itunesId || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.itunesId }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.feedUrl || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.feedUrl }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.itunesPageUrl || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.itunesPageUrl }} +

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.releaseDate || '' }}

+

+ {{ $strings.LabelCurrently }} {{ mediaMetadata.releaseDate }} +

@@ -281,7 +315,7 @@ export default { return this.$store.getters['libraries/getBookCoverAspectRatio'] }, filterData() { - return this.$store.state.libraries.filterData + return this.$store.state.libraries.filterData || {} }, providers() { if (this.isPodcast) return this.$store.state.scanners.podcastProviders @@ -321,6 +355,13 @@ export default { } }, methods: { + setMatchFieldValue(field, value) { + if (Array.isArray(value)) { + this.selectedMatch[field] = [...value] + } else { + this.selectedMatch[field] = value + } + }, selectAllToggled(val) { for (const key in this.selectedMatchUsage) { this.selectedMatchUsage[key] = val