mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
EpisodeFile cleanup and deletion fixes
Upgraded episodes will no longer be auto unmonitored EpsiodeFiles will be removed from db if parsing rules have changed EpisodeFiles will be removed from db if they are not in their series' folder (or subfolder)
This commit is contained in:
parent
19fc3bad6c
commit
4c1e6e14aa
11 changed files with 145 additions and 49 deletions
|
@ -20,11 +20,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||
|
||||
public bool IsSatisfiedBy(LocalEpisode localEpisode)
|
||||
{
|
||||
// if (_mediaFileService.Exists(localEpisode.Path))
|
||||
// {
|
||||
// _logger.Trace("File is a match for an existing episode file: {0}", localEpisode.Path);
|
||||
// return false;
|
||||
// }
|
||||
if (_mediaFileService.Exists(localEpisode.Path))
|
||||
{
|
||||
_logger.Trace("File is a match for an existing episode file: {0}", localEpisode.Path);
|
||||
return false;
|
||||
}
|
||||
|
||||
var existingFiles = localEpisode.Episodes.Where(e => e.EpisodeFileId > 0).Select(e => e.EpisodeFile.Value);
|
||||
|
||||
|
@ -36,9 +36,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||
_logger.Trace("File is a match for an existing episode file: {0}", localEpisode.Path);
|
||||
return false;
|
||||
}
|
||||
|
||||
_logger.Trace("Existing filename: {0} size: {1}", Path.GetFileName(existingFile.Path), existingFile.Size);
|
||||
_logger.Trace("New filename: {0} size: {1}", Path.GetFileName(localEpisode.Path), localEpisode.Size);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue