aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/Session/SessionWebSocketListener.cs4
-rw-r--r--MediaBrowser.Api/SyncPlay/SyncPlayService.cs16
2 files changed, 7 insertions, 13 deletions
diff --git a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
index a5293b41c..3af18f681 100644
--- a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -269,7 +269,7 @@ namespace Emby.Server.Implementations.Session
if (inactive.Any())
{
- _logger.LogInformation("Sending ForceKeepAlive message to {0} inactive WebSockets.", inactive.Count());
+ _logger.LogInformation("Sending ForceKeepAlive message to {0} inactive WebSockets.", inactive.Count);
}
foreach (var webSocket in inactive)
@@ -289,7 +289,7 @@ namespace Emby.Server.Implementations.Session
{
if (lost.Any())
{
- _logger.LogInformation("Lost {0} WebSockets.", lost.Count());
+ _logger.LogInformation("Lost {0} WebSockets.", lost.Count);
foreach (var webSocket in lost)
{
// TODO: handle session relative to the lost webSocket
diff --git a/MediaBrowser.Api/SyncPlay/SyncPlayService.cs b/MediaBrowser.Api/SyncPlay/SyncPlayService.cs
index 8f552ef89..8064ea7dc 100644
--- a/MediaBrowser.Api/SyncPlay/SyncPlayService.cs
+++ b/MediaBrowser.Api/SyncPlay/SyncPlayService.cs
@@ -182,13 +182,10 @@ namespace MediaBrowser.Api.SyncPlay
}
// Both null and empty strings mean that client isn't playing anything
- if (!String.IsNullOrEmpty(request.PlayingItemId))
+ if (!String.IsNullOrEmpty(request.PlayingItemId) && !Guid.TryParse(request.PlayingItemId, out playingItemId))
{
- if (!Guid.TryParse(request.PlayingItemId, out playingItemId))
- {
- Logger.LogError("JoinGroup: {0} is not a valid format for PlayingItemId. Ignoring request.", request.PlayingItemId);
- return;
- }
+ Logger.LogError("JoinGroup: {0} is not a valid format for PlayingItemId. Ignoring request.", request.PlayingItemId);
+ return;
}
var joinRequest = new JoinGroupRequest()
@@ -220,12 +217,9 @@ namespace MediaBrowser.Api.SyncPlay
var currentSession = GetSession(_sessionContext);
var filterItemId = Guid.Empty;
- if (!String.IsNullOrEmpty(request.FilterItemId))
+ if (!String.IsNullOrEmpty(request.FilterItemId) && !Guid.TryParse(request.FilterItemId, out filterItemId))
{
- if (!Guid.TryParse(request.FilterItemId, out filterItemId))
- {
- Logger.LogWarning("ListGroups: {0} is not a valid format for FilterItemId. Ignoring filter.", request.FilterItemId);
- }
+ Logger.LogWarning("ListGroups: {0} is not a valid format for FilterItemId. Ignoring filter.", request.FilterItemId);
}
return _syncPlayManager.ListGroups(currentSession, filterItemId);