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

(cherry picked from commit  f05e109b50cca496e7b42e2833eff161a43e12f4)
This commit is contained in:
Qstick 2023-01-26 09:27:58 +00:00 committed by Robin Dadswell
parent ce031124c7
commit 87d59d12a4
1 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Profiles;
using NzbDrone.Core.Qualities;
@ -41,6 +42,13 @@ namespace NzbDrone.Core.Movies
}
}
if (qualitiesBelowCutoff.Empty())
{
pagingSpec.Records = new List<Movie>();
return pagingSpec;
}
return _movieRepository.MoviesWhereCutoffUnmet(pagingSpec, qualitiesBelowCutoff);
}
}