From a3504b5e32c77ebf9998edc82c9959beb2f96aa8 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 24 Jan 2024 21:37:38 -0600 Subject: [PATCH] Prevent parsing for Roksbox metadata detection if not a matching extension --- .../Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs index 0ef36d545..b7ed855f8 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs @@ -91,13 +91,11 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox return metadata; } - var parseResult = Parser.Parser.ParseMusicTitle(filename); - - if (parseResult != null) + if (Path.GetExtension(filename).ToLowerInvariant() == ".xml") { - var extension = Path.GetExtension(filename).ToLowerInvariant(); + var parseResult = Parser.Parser.ParseMusicTitle(filename); - if (extension == ".xml") + if (parseResult != null) { metadata.Type = MetadataType.TrackMetadata; return metadata;