mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
More Season ignore work. Already ignored seasons will be ignored.
Fix: Season Ignore is handled separately from Episode Ignore.
This commit is contained in:
parent
969f8ae5e2
commit
aac42d4882
12 changed files with 171 additions and 47 deletions
|
@ -17,6 +17,13 @@ namespace NzbDrone.Core.Datastore.Migrations
|
|||
new Column("SeasonNumber", DbType.Int32, ColumnProperty.NotNull),
|
||||
new Column("Ignored", DbType.Boolean, ColumnProperty.NotNull)
|
||||
});
|
||||
|
||||
Database.ExecuteNonQuery(@"INSERT INTO Seasons (SeriesId, SeasonNumber, Ignored)
|
||||
SELECT SeriesId, SeasonNumber,
|
||||
CASE WHEN Count(*) =
|
||||
SUM(CASE WHEN Ignored = 1 THEN 1 ELSE 0 END) THEN 1 ELSE 0 END AS Ignored
|
||||
FROM Episodes
|
||||
GROUP BY SeriesId, SeasonNumber");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue