aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index f457a78b3..bbb3938dc 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -337,7 +337,7 @@ namespace Emby.Server.Implementations.Session
info.MediaSourceId = info.ItemId.ToString("N", CultureInfo.InvariantCulture);
}
- if (!info.ItemId.Equals(default) && info.Item is null && libraryItem is not null)
+ if (!info.ItemId.IsEmpty() && info.Item is null && libraryItem is not null)
{
var current = session.NowPlayingItem;
@@ -529,7 +529,7 @@ namespace Emby.Server.Implementations.Session
{
var users = new List<User>();
- if (session.UserId.Equals(default))
+ if (session.UserId.IsEmpty())
{
return users;
}
@@ -690,7 +690,7 @@ namespace Emby.Server.Implementations.Session
var session = GetSession(info.SessionId);
- var libraryItem = info.ItemId.Equals(default)
+ var libraryItem = info.ItemId.IsEmpty()
? null
: GetNowPlayingItem(session, info.ItemId);
@@ -784,7 +784,7 @@ namespace Emby.Server.Implementations.Session
var session = GetSession(info.SessionId);
- var libraryItem = info.ItemId.Equals(default)
+ var libraryItem = info.ItemId.IsEmpty()
? null
: GetNowPlayingItem(session, info.ItemId);
@@ -923,7 +923,7 @@ namespace Emby.Server.Implementations.Session
session.StopAutomaticProgress();
- var libraryItem = info.ItemId.Equals(default)
+ var libraryItem = info.ItemId.IsEmpty()
? null
: GetNowPlayingItem(session, info.ItemId);
@@ -933,7 +933,7 @@ namespace Emby.Server.Implementations.Session
info.MediaSourceId = info.ItemId.ToString("N", CultureInfo.InvariantCulture);
}
- if (!info.ItemId.Equals(default) && info.Item is null && libraryItem is not null)
+ if (!info.ItemId.IsEmpty() && info.Item is null && libraryItem is not null)
{
var current = session.NowPlayingItem;
@@ -1154,7 +1154,7 @@ namespace Emby.Server.Implementations.Session
var session = GetSessionToRemoteControl(sessionId);
- var user = session.UserId.Equals(default) ? null : _userManager.GetUserById(session.UserId);
+ var user = session.UserId.IsEmpty() ? null : _userManager.GetUserById(session.UserId);
List<BaseItem> items;
@@ -1223,7 +1223,7 @@ namespace Emby.Server.Implementations.Session
{
var controllingSession = GetSession(controllingSessionId);
AssertCanControl(session, controllingSession);
- if (!controllingSession.UserId.Equals(default))
+ if (!controllingSession.UserId.IsEmpty())
{
command.ControllingUserId = controllingSession.UserId;
}
@@ -1342,7 +1342,7 @@ namespace Emby.Server.Implementations.Session
{
var controllingSession = GetSession(controllingSessionId);
AssertCanControl(session, controllingSession);
- if (!controllingSession.UserId.Equals(default))
+ if (!controllingSession.UserId.IsEmpty())
{
command.ControllingUserId = controllingSession.UserId.ToString("N", CultureInfo.InvariantCulture);
}
@@ -1463,7 +1463,7 @@ namespace Emby.Server.Implementations.Session
ArgumentException.ThrowIfNullOrEmpty(request.AppVersion);
User user = null;
- if (!request.UserId.Equals(default))
+ if (!request.UserId.IsEmpty())
{
user = _userManager.GetUserById(request.UserId);
}
@@ -1766,7 +1766,7 @@ namespace Emby.Server.Implementations.Session
{
ArgumentNullException.ThrowIfNull(info);
- var user = info.UserId.Equals(default)
+ var user = info.UserId.IsEmpty()
? null
: _userManager.GetUserById(info.UserId);