mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Delay Profile: Fix for when preferred words is null. (#618)
This commit is contained in:
parent
520836f475
commit
d67d405024
1 changed files with 11 additions and 2 deletions
|
@ -44,8 +44,17 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|||
// Preferred word count
|
||||
var title = subject.Release.Title;
|
||||
var preferredWords = subject.Movie.Profile.Value.PreferredTags;
|
||||
var preferredCount = preferredWords.AsEnumerable().Count(w => title.ToLower().Contains(w.ToLower()));
|
||||
var preferredCount = 0;
|
||||
|
||||
if (preferredWords == null)
|
||||
{
|
||||
preferredCount = 1;
|
||||
_logger.Debug("Preferred words is null, setting preffered count to 1.");
|
||||
}
|
||||
else
|
||||
{
|
||||
preferredCount = preferredWords.AsEnumerable().Count(w => title.ToLower().Contains(w.ToLower()));
|
||||
}
|
||||
|
||||
if (delay == 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue