Reduced number of calls to GetPreference()

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Jpuc1143 2023-02-09 20:45:40 -03:00 committed by GitHub
parent 15b6d1672d
commit cb61a57e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}