diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-03-11 08:15:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 08:15:12 +0100 |
| commit | 53209830e7b566949c16b43c864f6f85336cb92c (patch) | |
| tree | 59a99d347cffe722da175269dfd99bac08fb7fb0 /Jellyfin.Api/Controllers/SuggestionsController.cs | |
| parent | 21ef6661d6ef48fb18da10b8e0abf2c1d1345ed1 (diff) | |
| parent | f50a250cd9fac47bcbd9a05e99c8ffe4d294e320 (diff) | |
Merge pull request #7346 from Bond-009/guid
Optimize Guid comparisons
Diffstat (limited to 'Jellyfin.Api/Controllers/SuggestionsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SuggestionsController.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/SuggestionsController.cs b/Jellyfin.Api/Controllers/SuggestionsController.cs index 73be26bb2..e9c46dcf3 100644 --- a/Jellyfin.Api/Controllers/SuggestionsController.cs +++ b/Jellyfin.Api/Controllers/SuggestionsController.cs @@ -63,7 +63,9 @@ namespace Jellyfin.Api.Controllers [FromQuery] int? limit, [FromQuery] bool enableTotalRecordCount = false) { - var user = !userId.Equals(Guid.Empty) ? _userManager.GetUserById(userId) : null; + var user = userId.Equals(default) + ? null + : _userManager.GetUserById(userId); var dtoOptions = new DtoOptions().AddClientFields(Request); var result = _libraryManager.GetItemsResult(new InternalItemsQuery(user) |
