Update:Trim whitespace from audio file meta tag values #1305

This commit is contained in:
advplyr 2022-12-21 07:13:28 -06:00
parent c4be75b5bd
commit 657d4dd705
2 changed files with 14 additions and 9 deletions

View file

@ -88,8 +88,8 @@ class PodcastMetadata {
}
searchQuery(query) { // Returns key if match is found
var keysToCheck = ['title', 'author', 'itunesId', 'itunesArtistId']
for (var key of keysToCheck) {
const keysToCheck = ['title', 'author', 'itunesId', 'itunesArtistId']
for (const key of keysToCheck) {
if (this[key] && cleanStringForSearch(String(this[key])).includes(query)) {
return {
matchKey: key,
@ -118,8 +118,8 @@ class PodcastMetadata {
}
update(payload) {
var json = this.toJSON()
var hasUpdates = false
const json = this.toJSON()
let hasUpdates = false
for (const key in json) {
if (payload[key] !== undefined) {
if (!areEquivalent(payload[key], json[key])) {