Add:Global library search also searches on podcast episode titles #1363

This commit is contained in:
advplyr 2023-01-04 17:43:15 -06:00
parent 88bd51e2da
commit 1609f1a499
7 changed files with 45 additions and 20 deletions

View file

@ -1,5 +1,5 @@
const Path = require('path')
const { getId } = require('../../utils/index')
const { getId, cleanStringForSearch } = require('../../utils/index')
const AudioFile = require('../files/AudioFile')
const AudioTrack = require('../files/AudioTrack')
@ -160,5 +160,9 @@ class PodcastEpisode {
if (!this.enclosure || !this.enclosure.url) return false
return this.enclosure.url == url
}
searchQuery(query) {
return cleanStringForSearch(this.title).includes(query)
}
}
module.exports = PodcastEpisode