From d04bb5333afe0cbd8fe7c867e2ae0bc0b8d2156d Mon Sep 17 00:00:00 2001 From: bpoxy Date: Sat, 1 Apr 2023 18:03:53 -0600 Subject: [PATCH] Fixed: Matching of custom formats during track files import (cherry picked from commit 7fedfe7423a525f05008c2c7c15e3cb0c9c38fe5) Closes #3484 --- .../CustomFormats/CustomFormatCalculationService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs b/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs index 6f8421c13..33f85050b 100644 --- a/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs +++ b/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs @@ -105,7 +105,7 @@ namespace NzbDrone.Core.CustomFormats var albumInfo = new ParsedAlbumInfo { ArtistName = localTrack.Artist.Name, - ReleaseTitle = localTrack.SceneName, + ReleaseTitle = localTrack.SceneName.IsNotNullOrWhiteSpace() ? localTrack.SceneName : Path.GetFileName(localTrack.Path), Quality = localTrack.Quality, ReleaseGroup = localTrack.ReleaseGroup }; @@ -114,7 +114,8 @@ namespace NzbDrone.Core.CustomFormats { AlbumInfo = albumInfo, Artist = localTrack.Artist, - Size = localTrack.Size + Size = localTrack.Size, + Filename = Path.GetFileName(localTrack.Path) }; return ParseCustomFormat(input);