mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-26 04:33:01 +01:00
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 Closes #5365
This commit is contained in:
parent
2c65e4fa41
commit
997aabbc3c
@ -155,13 +155,14 @@ namespace NzbDrone.Core.CustomFormats
|
||||
private static List<CustomFormat> ParseCustomFormat(EpisodeFile episodeFile, Series series, List<CustomFormat> allCustomFormats)
|
||||
{
|
||||
var sceneName = string.Empty;
|
||||
|
||||
if (episodeFile.SceneName.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
sceneName = episodeFile.SceneName;
|
||||
}
|
||||
else if (episodeFile.OriginalFilePath.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
sceneName = episodeFile.OriginalFilePath;
|
||||
sceneName = Path.GetFileName(episodeFile.OriginalFilePath);
|
||||
}
|
||||
else if (episodeFile.RelativePath.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user