1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Fix ignoring title based on pre-rename moviefile

(cherry picked from commit af5a681ab7edf7f72544647c490216907853d77d)

Fixed: Renaming movie file for a movie

(cherry picked from commit fc06e5135213f218648c8b36747d3bdf361f08b4)
This commit is contained in:
Jendrik Weise
2024-03-24 15:08:59 +01:00
committed by Bogdan
parent fcb758bf67
commit 229e87f398
11 changed files with 34 additions and 29 deletions
@@ -32,12 +32,12 @@ namespace NzbDrone.Core.Extras.Subtitles
public override int Order => 1;
public override IEnumerable<ExtraFile> ProcessFiles(Movie movie, List<string> filesOnDisk, List<string> importedFiles, bool keepExistingEntries)
public override IEnumerable<ExtraFile> ProcessFiles(Movie movie, List<string> filesOnDisk, List<string> importedFiles, string fileNameBeforeRename)
{
_logger.Debug("Looking for existing subtitle files in {0}", movie.Path);
var subtitleFiles = new List<SubtitleFile>();
var filterResult = FilterAndClean(movie, filesOnDisk, importedFiles, keepExistingEntries);
var filterResult = FilterAndClean(movie, filesOnDisk, importedFiles, fileNameBeforeRename is not null);
foreach (var possibleSubtitleFile in filterResult.FilesOnDisk)
{
@@ -57,7 +57,8 @@ namespace NzbDrone.Core.Extras.Subtitles
{
FileMovieInfo = minimalInfo,
Movie = movie,
Path = possibleSubtitleFile
Path = possibleSubtitleFile,
FileNameBeforeRename = fileNameBeforeRename
};
try