mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-17 15:53:42 +01:00
Minor fixes
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
/// <summary>
|
||||
/// Checks if a session is in this group.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session id to check.</param>
|
||||
/// <param name="sessionId">The session identifier to check.</param>
|
||||
/// <returns><c>true</c> if the session is in this group; <c>false</c> otherwise.</returns>
|
||||
private bool ContainsSession(string sessionId)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check is participants can access the new playing queue.
|
||||
// Check if participants can access the new playing queue.
|
||||
if (!AllUsersHaveAccessToQueue(playQueue))
|
||||
{
|
||||
return false;
|
||||
@@ -583,7 +583,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check is participants can access the new playing queue.
|
||||
// Check if participants can access the new playing queue.
|
||||
if (!AllUsersHaveAccessToQueue(newItems))
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
context.LastActivity = currentTime;
|
||||
// Seek only if playback actually started.
|
||||
// Pause request may be issued during the delay added to account for latency.
|
||||
context.PositionTicks += elapsedTime.Ticks > 0 ? elapsedTime.Ticks : 0;
|
||||
context.PositionTicks += Math.Max(elapsedTime.Ticks, 0);
|
||||
|
||||
var command = context.NewSyncPlayCommand(SendCommandType.Pause);
|
||||
context.SendCommand(session, SyncPlayBroadcastType.AllGroup, command, cancellationToken);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
context.LastActivity = currentTime;
|
||||
// Seek only if playback actually started.
|
||||
// Event may happen during the delay added to account for latency.
|
||||
context.PositionTicks += elapsedTime.Ticks > 0 ? elapsedTime.Ticks : 0;
|
||||
context.PositionTicks += Math.Max(elapsedTime.Ticks, 0);
|
||||
}
|
||||
|
||||
// Prepare new session.
|
||||
@@ -151,7 +151,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, {2} set a new play queue.", request.GetRequestType(), context.GroupId.ToString(), session.Id.ToString());
|
||||
@@ -176,7 +176,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
}
|
||||
else
|
||||
@@ -221,7 +221,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, waiting for all ready events.", request.GetRequestType(), context.GroupId.ToString());
|
||||
@@ -314,7 +314,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var command = context.NewSyncPlayCommand(SendCommandType.Seek);
|
||||
context.SendCommand(session, SyncPlayBroadcastType.AllGroup, command, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
|
||||
// Notify relevant state change event.
|
||||
@@ -355,7 +355,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var currentTime = DateTime.UtcNow;
|
||||
var elapsedTime = currentTime - context.LastActivity;
|
||||
context.LastActivity = currentTime;
|
||||
context.PositionTicks += elapsedTime.Ticks > 0 ? elapsedTime.Ticks : 0;
|
||||
context.PositionTicks += Math.Max(elapsedTime.Ticks, 0);
|
||||
|
||||
// Send pause command to all non-buffering sessions.
|
||||
var command = context.NewSyncPlayCommand(SendCommandType.Pause);
|
||||
@@ -559,7 +559,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
// Make sure the client knows the playing item, to avoid duplicate requests.
|
||||
if (!request.PlaylistItemId.Equals(context.PlayQueue.GetPlayingItemPlaylistId()))
|
||||
{
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, client provided the wrong playlist id.", request.GetRequestType(), context.GroupId.ToString());
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, client provided the wrong playlist identifier.", request.GetRequestType(), context.GroupId.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
}
|
||||
else
|
||||
@@ -612,7 +612,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
// Make sure the client knows the playing item, to avoid duplicate requests.
|
||||
if (!request.PlaylistItemId.Equals(context.PlayQueue.GetPlayingItemPlaylistId()))
|
||||
{
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, client provided the wrong playlist id.", request.GetRequestType(), context.GroupId.ToString());
|
||||
_logger.LogDebug("HandleRequest: {0} in group {1}, client provided the wrong playlist identifier.", request.GetRequestType(), context.GroupId.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||
|
||||
// Reset status of sessions and await for all Ready events before sending Play command.
|
||||
// Reset status of sessions and await for all Ready events.
|
||||
context.SetAllBuffering(true);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user