Fixed: Avoid Sqlite Error when all profiles have lowest quality cutoff

Fixes #3308
pull/3313/head
Qstick 2 years ago
parent bbde55e6e3
commit 6c3b3122f3

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
@ -39,6 +40,13 @@ namespace NzbDrone.Core.Music
}
}
if (qualitiesBelowCutoff.Empty())
{
pagingSpec.Records = new List<Album>();
return pagingSpec;
}
return _albumRepository.AlbumsWhereCutoffUnmet(pagingSpec, qualitiesBelowCutoff);
}
}

Loading…
Cancel
Save