diff --git a/components/cards/ItemSearchCard.vue b/components/cards/ItemSearchCard.vue index 8586b8ba..190a7b4b 100644 --- a/components/cards/ItemSearchCard.vue +++ b/components/cards/ItemSearchCard.vue @@ -1,16 +1,10 @@ @@ -22,9 +16,7 @@ export default { type: Object, default: () => {} }, - search: String, - matchKey: String, - matchText: String + search: String }, data() { return {} @@ -58,35 +50,6 @@ export default { authorName() { if (this.isPodcast) return this.mediaMetadata.author return this.mediaMetadata.authorName - }, - matchHtml() { - if (!this.matchText || !this.search) return '' - if (this.matchKey === 'subtitle') return '' - var matchSplit = this.matchText.toLowerCase().split(this.search.toLowerCase().trim()) - if (matchSplit.length < 2) return '' - - var html = '' - var totalLenSoFar = 0 - for (let i = 0; i < matchSplit.length - 1; i++) { - var indexOf = matchSplit[i].length - var firstPart = this.matchText.substr(totalLenSoFar, indexOf) - var actualWasThere = this.matchText.substr(totalLenSoFar + indexOf, this.search.length) - totalLenSoFar += indexOf + this.search.length - - html += `${firstPart}${actualWasThere}` - } - var lastPart = this.matchText.substr(totalLenSoFar) - html += lastPart - - if (this.matchKey === 'episode') return `

Episode: ${html}

` - if (this.matchKey === 'tags') return `

Tags: ${html}

` - if (this.matchKey === 'subtitle') return `

${html}

` - if (this.matchKey === 'authors') return `by ${html}` - if (this.matchKey === 'isbn') return `

ISBN: ${html}

` - if (this.matchKey === 'asin') return `

ASIN: ${html}

` - if (this.matchKey === 'series') return `

Series: ${html}

` - if (this.matchKey === 'narrators') return `

Narrator: ${html}

` - return `${html}` } }, methods: {}, @@ -101,4 +64,4 @@ export default { flex-direction: column; justify-content: center; } - \ No newline at end of file + diff --git a/pages/search.vue b/pages/search.vue index 6367bf8e..0827bd58 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -14,7 +14,7 @@ @@ -23,7 +23,7 @@ @@ -160,4 +160,4 @@ export default { height: calc(100% - 108px); max-height: calc(100% - 108px); } - \ No newline at end of file + diff --git a/strings/en-us.json b/strings/en-us.json index 4cef2acf..57fd2491 100644 --- a/strings/en-us.json +++ b/strings/en-us.json @@ -113,6 +113,7 @@ "LabelAutoSleepTimerAutoRewindHelp": "When the auto sleep timer finishes, playing the item again will automatically rewind your position.", "LabelAutoSleepTimerHelp": "When playing media between the specified start and end times a sleep timer will automatically start.", "LabelBooks": "Books", + "LabelByAuthor": "by {0}", "LabelChapterTrack": "Chapter Track", "LabelChapters": "Chapters", "LabelClosePlayer": "Close player",