mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 05:18:27 +01:00
Use CultureInvariant string conversion for Guids
This commit is contained in:
@@ -327,7 +327,7 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
if (string.IsNullOrEmpty(info.MediaSourceId))
|
||||
{
|
||||
info.MediaSourceId = info.ItemId.ToString("N");
|
||||
info.MediaSourceId = info.ItemId.ToString("N", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
if (!info.ItemId.Equals(Guid.Empty) && info.Item == null && libraryItem != null)
|
||||
@@ -463,7 +463,7 @@ namespace Emby.Server.Implementations.Session
|
||||
Client = appName,
|
||||
DeviceId = deviceId,
|
||||
ApplicationVersion = appVersion,
|
||||
Id = key.GetMD5().ToString("N"),
|
||||
Id = key.GetMD5().ToString("N", CultureInfo.InvariantCulture),
|
||||
ServerId = _appHost.SystemId
|
||||
};
|
||||
|
||||
@@ -845,7 +845,7 @@ namespace Emby.Server.Implementations.Session
|
||||
// Normalize
|
||||
if (string.IsNullOrEmpty(info.MediaSourceId))
|
||||
{
|
||||
info.MediaSourceId = info.ItemId.ToString("N");
|
||||
info.MediaSourceId = info.ItemId.ToString("N", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
if (!info.ItemId.Equals(Guid.Empty) && info.Item == null && libraryItem != null)
|
||||
@@ -1029,7 +1029,7 @@ namespace Emby.Server.Implementations.Session
|
||||
private static async Task SendMessageToSession<T>(SessionInfo session, string name, T data, CancellationToken cancellationToken)
|
||||
{
|
||||
var controllers = session.SessionControllers.ToArray();
|
||||
var messageId = Guid.NewGuid().ToString("N");
|
||||
var messageId = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
|
||||
|
||||
foreach (var controller in controllers)
|
||||
{
|
||||
@@ -1234,7 +1234,7 @@ namespace Emby.Server.Implementations.Session
|
||||
AssertCanControl(session, controllingSession);
|
||||
if (!controllingSession.UserId.Equals(Guid.Empty))
|
||||
{
|
||||
command.ControllingUserId = controllingSession.UserId.ToString("N");
|
||||
command.ControllingUserId = controllingSession.UserId.ToString("N", CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1484,7 +1484,7 @@ namespace Emby.Server.Implementations.Session
|
||||
DeviceId = deviceId,
|
||||
DeviceName = deviceName,
|
||||
UserId = user.Id,
|
||||
AccessToken = Guid.NewGuid().ToString("N"),
|
||||
AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture),
|
||||
UserName = user.Name
|
||||
};
|
||||
|
||||
@@ -1822,6 +1822,7 @@ namespace Emby.Server.Implementations.Session
|
||||
CheckDisposed();
|
||||
|
||||
var sessions = Sessions.Where(i => string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
return SendMessageToSessions(sessions, name, data, cancellationToken);
|
||||
}
|
||||
|
||||
@@ -1831,6 +1832,7 @@ namespace Emby.Server.Implementations.Session
|
||||
|
||||
var sessions = Sessions
|
||||
.Where(i => string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase) || IsAdminSession(i));
|
||||
|
||||
return SendMessageToSessions(sessions, name, data, cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user