mirror of
https://github.com/Radarr/Radarr
synced 2024-12-23 00:12:44 +00:00
PathEquals is used for MoveEpisodeFile.
Cleanup will log an error if it fails to alter the DB.
This commit is contained in:
parent
a7a7c4ab49
commit
1c06ee2a01
1 changed files with 3 additions and 2 deletions
|
@ -176,7 +176,7 @@ public virtual bool MoveEpisodeFile(EpisodeFile episodeFile, bool newDownload =
|
|||
var newFile = _mediaFileProvider.CalculateFilePath(series, episodes.First().SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path));
|
||||
|
||||
//Only rename if existing and new filenames don't match
|
||||
if (episodeFile.Path == newFile.FullName)
|
||||
if (DiskProvider.PathEquals(episodeFile.Path, newFile.FullName))
|
||||
{
|
||||
Logger.Debug("Skipping file rename, source and destination are the same: {0}", episodeFile.Path);
|
||||
return false;
|
||||
|
@ -243,7 +243,8 @@ public virtual void CleanUp(IList<EpisodeFile> files)
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WarnException(ex.Message, ex);
|
||||
var message = String.Format("Unable to cleanup EpisodeFile in DB: {0}", episodeFile.EpisodeFileId);
|
||||
Logger.ErrorException(message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue