mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Added method to delete orphaned episodeFiles and also cleanup episodes that have invalid episodeFiles.
Cleanup will run aforementioned methods before doing cleanup.
This commit is contained in:
parent
208feb7d19
commit
68b7ba9209
3 changed files with 65 additions and 1 deletions
|
@ -196,7 +196,9 @@ namespace NzbDrone.Core.Providers
|
|||
/// <param name = "files">list of files to verify</param>
|
||||
public virtual void CleanUp(List<EpisodeFile> files)
|
||||
{
|
||||
//TODO: remove orphaned files. in files table but not linked to from episode table.
|
||||
_mediaFileProvider.CleanEpisodesWithNonExistantFiles();
|
||||
_mediaFileProvider.DeleteOrphanedEpisodeFiles();
|
||||
|
||||
foreach (var episodeFile in files)
|
||||
{
|
||||
if (!_diskProvider.FileExists(episodeFile.Path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue