mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-01 12:44:06 +01:00
Update:Global library search strips periods, commas and other characters when matching #750
This commit is contained in:
1 parent
256a9322ef
commit
5b4d3f71f9
8 files changed
+20
-26
No files matched your search
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user