From e248b6d8d8a89730a2b37b457b6198822a1d5da6 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 25 Mar 2023 16:09:41 -0500 Subject: [PATCH] Fix:Parsing id3 tags case insensitive --- server/utils/prober.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/utils/prober.js b/server/utils/prober.js index 552a2304..92df3f01 100644 --- a/server/utils/prober.js +++ b/server/utils/prober.js @@ -73,7 +73,8 @@ function tryGrabChannelLayout(stream) { function tryGrabTags(stream, ...tags) { if (!stream.tags) return null for (let i = 0; i < tags.length; i++) { - const value = stream.tags[tags[i]] || stream.tags[tags[i].toUpperCase()] + const tagKey = Object.keys(stream.tags).find(t => t.toLowerCase() === tags[i].toLowerCase()) + const value = stream.tags[tagKey] if (value && value.trim()) return value.trim() } return null @@ -161,6 +162,7 @@ function parseTags(format, verbose) { if (verbose) { Logger.debug('Tags', format.tags) } + const tags = { file_tag_encoder: tryGrabTags(format, 'encoder', 'tsse', 'tss'), file_tag_encodedby: tryGrabTags(format, 'encoded_by', 'tenc', 'ten'),