aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-04-17 16:33:07 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-04-17 16:33:07 -0400
commiteb9b63c7a711528089b6d418f98a2b63870392e7 (patch)
treef575803110c3989f1df24b62058c408a179ce6ca /Emby.Server.Implementations/Session
parent561028c90734b911ebb5eec26aa071fb6851a2a6 (diff)
update playback progress reporting
Diffstat (limited to 'Emby.Server.Implementations/Session')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs24
-rw-r--r--Emby.Server.Implementations/Session/SessionWebSocketListener.cs6
2 files changed, 10 insertions, 20 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index 63556c1ce..0a2312735 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -612,8 +612,7 @@ namespace Emby.Server.Implementations.Session
ClearTranscodingInfo(session.DeviceId);
}
- session.StopAutomaticProgress();
- session.QueueableMediaTypes = info.QueueableMediaTypes;
+ session.StartAutomaticProgress(_timerFactory, info);
var users = GetUsers(session);
@@ -720,7 +719,11 @@ namespace Emby.Server.Implementations.Session
}, _logger);
- session.StartAutomaticProgress(_timerFactory, info);
+ if (!isAutomated)
+ {
+ session.StartAutomaticProgress(_timerFactory, info);
+ }
+
StartIdleCheckTimer();
}
@@ -1005,19 +1008,9 @@ namespace Emby.Server.Implementations.Session
}
}
- if (command.PlayCommand != PlayCommand.PlayNow)
+ if (items.Any(i => !session.PlayableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase)))
{
- if (items.Any(i => !session.QueueableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase)))
- {
- throw new ArgumentException(string.Format("{0} is unable to queue the requested media type.", session.DeviceName ?? session.Id));
- }
- }
- else
- {
- if (items.Any(i => !session.PlayableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase)))
- {
- throw new ArgumentException(string.Format("{0} is unable to play the requested media type.", session.DeviceName ?? session.Id));
- }
+ throw new ArgumentException(string.Format("{0} is unable to play the requested media type.", session.DeviceName ?? session.Id));
}
if (user != null && command.ItemIds.Length == 1 && user.Configuration.EnableNextEpisodeAutoPlay)
@@ -1597,7 +1590,6 @@ namespace Emby.Server.Implementations.Session
LastActivityDate = session.LastActivityDate,
NowViewingItem = session.NowViewingItem,
ApplicationVersion = session.ApplicationVersion,
- QueueableMediaTypes = session.QueueableMediaTypes,
PlayableMediaTypes = session.PlayableMediaTypes,
AdditionalUsers = session.AdditionalUsers,
SupportedCommands = session.SupportedCommands,
diff --git a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
index 336c2caee..478f9da71 100644
--- a/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/Emby.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -289,7 +289,6 @@ namespace Emby.Server.Implementations.Session
var itemId = vals[0];
- var queueableMediaTypes = string.Empty;
var canSeek = true;
if (vals.Length > 1)
@@ -298,15 +297,14 @@ namespace Emby.Server.Implementations.Session
}
if (vals.Length > 2)
{
- queueableMediaTypes = vals[2];
+ // vals[2] used to be QueueableMediaTypes
}
var info = new PlaybackStartInfo
{
CanSeek = canSeek,
ItemId = itemId,
- SessionId = session.Id,
- QueueableMediaTypes = queueableMediaTypes.Split(',').ToList()
+ SessionId = session.Id
};
if (vals.Length > 3)