mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-21 06:39:06 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -155,13 +155,14 @@ namespace NzbDrone.Core.CustomFormats
|
||||||
private static List<CustomFormat> ParseCustomFormat(EpisodeFile episodeFile, Series series, List<CustomFormat> allCustomFormats)
|
private static List<CustomFormat> ParseCustomFormat(EpisodeFile episodeFile, Series series, List<CustomFormat> allCustomFormats)
|
||||||
{
|
{
|
||||||
var sceneName = string.Empty;
|
var sceneName = string.Empty;
|
||||||
|
|
||||||
if (episodeFile.SceneName.IsNotNullOrWhiteSpace())
|
if (episodeFile.SceneName.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
sceneName = episodeFile.SceneName;
|
sceneName = episodeFile.SceneName;
|
||||||
}
|
}
|
||||||
else if (episodeFile.OriginalFilePath.IsNotNullOrWhiteSpace())
|
else if (episodeFile.OriginalFilePath.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
sceneName = episodeFile.OriginalFilePath;
|
sceneName = Path.GetFileName(episodeFile.OriginalFilePath);
|
||||||
}
|
}
|
||||||
else if (episodeFile.RelativePath.IsNotNullOrWhiteSpace())
|
else if (episodeFile.RelativePath.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue