Added the ability to auto-ignore episodes for files that are deleted, good for people that delete after watching. Option is not exposed in the UI and is disabled by default (obviously).

This commit is contained in:
Mark McDowall 2012-01-15 20:12:47 -08:00
commit 218059e08d
6 changed files with 108 additions and 1 deletions

View file

@ -463,5 +463,13 @@ namespace NzbDrone.Core.Providers
Logger.Trace("Updating PostDownloadStatus for all episodeIds in {0}", episodeIdString);
_database.Execute(episodeIdQuery);
}
/// <summary>
/// Sets Ignored to true if the episode successfully downloaded (PostDownloadStatus = 5), but EpisodeFileId = 0
/// </summary>
public virtual void SetPreviouslyDownloadedToIgnored()
{
_database.Execute("UPDATE Episodes SET Ignored = 1, PostDownloadStatus = 0 WHERE PostDownloadStatus = 5 AND EpisodeFileId = 0");
}
}
}