mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 16:13:58 -07:00
Wired in the season and episode ignore saving.
Converted setSeasonIgnore & setEpisodeIgnore to use inline SQL. Added tests for setSeasonIgnore & setEpisodeIgnore.
This commit is contained in:
parent
c32346e6ea
commit
c88ead0585
6 changed files with 198 additions and 31 deletions
|
@ -148,12 +148,17 @@ namespace NzbDrone.Web.Controllers
|
|||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult SaveSeason(int seriesId, int seasonNumber, bool monitored)
|
||||
public JsonResult SaveSeasonIgnore(int seriesId, int seasonNumber, bool ignored)
|
||||
{
|
||||
if (_episodeProvider.IsIgnored(seriesId, seasonNumber) == monitored)
|
||||
{
|
||||
_episodeProvider.SetSeasonIgnore(seriesId, seasonNumber, !monitored);
|
||||
}
|
||||
_episodeProvider.SetSeasonIgnore(seriesId, seasonNumber, ignored);
|
||||
|
||||
return new JsonResult { Data = "ok" };
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult SaveEpisodeIgnore(int episodeId, bool ignored)
|
||||
{
|
||||
_episodeProvider.SetEpisodeIgnore(episodeId, ignored);
|
||||
|
||||
return new JsonResult { Data = "ok" };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue