|
|
|
@ -18,8 +18,8 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
|
|
|
|
|
|
|
|
|
|
public void Clean()
|
|
|
|
|
{
|
|
|
|
|
using (var mapper = _database.OpenConnection())
|
|
|
|
|
{
|
|
|
|
|
var mapper = _database.OpenConnection();
|
|
|
|
|
|
|
|
|
|
var usedTags = new[] { "Movies", "Notifications", "DelayProfiles", "Restrictions", "ImportLists", "Indexers" }
|
|
|
|
|
.SelectMany(v => GetUsedTags(v, mapper))
|
|
|
|
|
.Distinct()
|
|
|
|
@ -29,7 +29,6 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
|
|
|
|
|
|
|
|
|
|
mapper.Execute($"DELETE FROM Tags WHERE NOT Id IN ({usedTagsList})");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int[] GetUsedTags(string table, IDbConnection mapper)
|
|
|
|
|
{
|
|
|
|
|