mirror of https://github.com/jellyfin/jellyfin.git
Reduced number of calls to GetPreference()
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
15b6d1672d
commit
cb61a57e82
|
@ -1607,7 +1607,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue