mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-16 00:39:40 +00:00
Update:Global library search strips periods, commas and other characters when matching #750
This commit is contained in:
parent
256a9322ef
commit
5b4d3f71f9
8 changed files with 20 additions and 26 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const Logger = require('../../Logger')
|
||||
const { areEquivalent, copyValue } = require('../../utils/index')
|
||||
const { areEquivalent, copyValue, cleanStringForSearch } = require('../../utils/index')
|
||||
|
||||
class PodcastMetadata {
|
||||
constructor(metadata) {
|
||||
|
|
@ -94,7 +94,7 @@ class PodcastMetadata {
|
|||
searchQuery(query) { // Returns key if match is found
|
||||
var keysToCheck = ['title', 'author', 'itunesId', 'itunesArtistId']
|
||||
for (var key of keysToCheck) {
|
||||
if (this[key] && String(this[key]).toLowerCase().includes(query)) {
|
||||
if (this[key] && cleanStringForSearch(String(this[key])).includes(query)) {
|
||||
return {
|
||||
matchKey: key,
|
||||
matchText: this[key]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue