Reduced number of calls to GetPreference()

Co-authored-by: Cody Robibero <cody@robibe.ro>
pull/9139/head
Jpuc1143 1 year ago committed by GitHub
parent 15b6d1672d
commit cb61a57e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1607,7 +1607,8 @@ namespace MediaBrowser.Controller.Entities
return false;
}
if (user.GetPreference(PreferenceKind.AllowedTags).Any() && !user.GetPreference(PreferenceKind.AllowedTags).Any(i => Tags.Contains(i, StringComparison.OrdinalIgnoreCase)))
var allowedTagsPreference = user.GetPreference(PreferenceKind.AllowedTags);
if (allowedTagsPreference.Any() && !allowedTagsPreference.Any(i => Tags.Contains(i, StringComparison.OrdinalIgnoreCase)))
{
return false;
}

Loading…
Cancel
Save