mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Use originalFilePath in CF if scene name missing
This commit is contained in:
parent
6706138fa0
commit
e870fd5215
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Blacklisting;
|
||||
@ -59,10 +60,24 @@ public static List<CustomFormat> ParseCustomFormat(ParsedMovieInfo movieInfo, Li
|
||||
|
||||
public static List<CustomFormat> ParseCustomFormat(MovieFile movieFile, List<CustomFormat> allCustomFormats)
|
||||
{
|
||||
var sceneName = string.Empty;
|
||||
if (movieFile.SceneName.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
sceneName = movieFile.SceneName;
|
||||
}
|
||||
else if (movieFile.OriginalFilePath.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
sceneName = movieFile.OriginalFilePath;
|
||||
}
|
||||
else if (movieFile.RelativePath.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
sceneName = Path.GetFileName(movieFile.RelativePath);
|
||||
}
|
||||
|
||||
var info = new ParsedMovieInfo
|
||||
{
|
||||
MovieTitle = movieFile.Movie.Title,
|
||||
SimpleReleaseTitle = movieFile.GetSceneOrFileName().SimplifyReleaseTitle(),
|
||||
SimpleReleaseTitle = sceneName.SimplifyReleaseTitle(),
|
||||
Quality = movieFile.Quality,
|
||||
Languages = movieFile.Languages,
|
||||
ReleaseGroup = movieFile.ReleaseGroup,
|
||||
|
Loading…
Reference in New Issue
Block a user