aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations/Devices/DeviceManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Devices/DeviceManager.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
index 0655c9813..6c77421c7 100644
--- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
+++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
@@ -7,6 +7,7 @@ using Jellyfin.Data.Entities.Security;
using Jellyfin.Data.Enums;
using Jellyfin.Data.Events;
using Jellyfin.Data.Queries;
+using Jellyfin.Extensions;
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Devices;
@@ -23,7 +24,7 @@ namespace Jellyfin.Server.Implementations.Devices
{
private readonly JellyfinDbProvider _dbProvider;
private readonly IUserManager _userManager;
- private readonly ConcurrentDictionary<string, ClientCapabilities> _capabilitiesMap = new ();
+ private readonly ConcurrentDictionary<string, ClientCapabilities> _capabilitiesMap = new();
/// <summary>
/// Initializes a new instance of the <see cref="DeviceManager"/> class.
@@ -172,8 +173,8 @@ namespace Jellyfin.Server.Implementations.Devices
var sessions = dbContext.Devices
.Include(d => d.User)
.AsQueryable()
- .OrderBy(d => d.DeviceId)
- .ThenByDescending(d => d.DateLastActivity)
+ .OrderByDescending(d => d.DateLastActivity)
+ .ThenBy(d => d.DeviceId)
.AsAsyncEnumerable();
if (supportsSync.HasValue)
@@ -219,7 +220,7 @@ namespace Jellyfin.Server.Implementations.Devices
return true;
}
- return user.GetPreference(PreferenceKind.EnabledDevices).Contains(deviceId, StringComparer.OrdinalIgnoreCase)
+ return user.GetPreference(PreferenceKind.EnabledDevices).Contains(deviceId, StringComparison.OrdinalIgnoreCase)
|| !GetCapabilities(deviceId).SupportsPersistentIdentifier;
}