mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Patch data-races and minor changes in SyncPlay
This commit is contained in:
@@ -19,9 +19,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||
/// <param name="startPositionTicks">The start position ticks.</param>
|
||||
public PlayGroupRequest(Guid[] playingQueue, int playingItemPosition, long startPositionTicks)
|
||||
{
|
||||
var list = new List<Guid>();
|
||||
list.AddRange(playingQueue);
|
||||
PlayingQueue = list;
|
||||
PlayingQueue = playingQueue ?? Array.Empty<Guid>();
|
||||
PlayingItemPosition = playingItemPosition;
|
||||
StartPositionTicks = startPositionTicks;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||
/// <param name="mode">The enqueue mode.</param>
|
||||
public QueueGroupRequest(Guid[] items, GroupQueueMode mode)
|
||||
{
|
||||
var list = new List<Guid>();
|
||||
list.AddRange(items);
|
||||
ItemIds = list;
|
||||
ItemIds = items ?? Array.Empty<Guid>();
|
||||
Mode = mode;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Controller.Session;
|
||||
@@ -16,9 +17,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||
/// <param name="items">The playlist ids of the items to remove.</param>
|
||||
public RemoveFromPlaylistGroupRequest(string[] items)
|
||||
{
|
||||
var list = new List<string>();
|
||||
list.AddRange(items);
|
||||
PlaylistItemIds = list;
|
||||
PlaylistItemIds = items ?? Array.Empty<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user