Improve CF calculation for files without scene name

Fixed: Use original filename instead of complete path when calculating CF for existing file without scene name

(cherry picked from commit 997aabbc3cfc3c9c5c220786d1d08cfceec5e2f2)

Closes #8115
pull/9067/head
Mark McDowall 2 years ago committed by Bogdan
parent d9e337f2fb
commit a39cafe404

@ -168,13 +168,14 @@ namespace NzbDrone.Core.CustomFormats
private static List<CustomFormat> ParseCustomFormat(MovieFile movieFile, Movie movie, List<CustomFormat> allCustomFormats)
{
var releaseTitle = string.Empty;
if (movieFile.SceneName.IsNotNullOrWhiteSpace())
{
releaseTitle = movieFile.SceneName;
}
else if (movieFile.OriginalFilePath.IsNotNullOrWhiteSpace())
{
releaseTitle = movieFile.OriginalFilePath;
releaseTitle = Path.GetFileName(movieFile.OriginalFilePath);
}
else if (movieFile.RelativePath.IsNotNullOrWhiteSpace())
{

Loading…
Cancel
Save