aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-01-14 08:12:45 -0700
committerCody Robibero <cody@robibe.ro>2022-01-14 08:14:31 -0700
commitee46754238a38e84ef9e96795ee454cec33eed5a (patch)
tree1367be385b291f3a4cfe58bf780c61932f4753a6
parent5df6058a8e9024bcf323b03a411631fd1c538611 (diff)
Fix build and clean up
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs13
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs6
2 files changed, 10 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index ad5bd63ff..ab860ef67 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -424,16 +424,15 @@ namespace Emby.Server.Implementations.Session
var nowPlayingQueue = info.NowPlayingQueue;
- if (nowPlayingQueue != null)
+ if (nowPlayingQueue?.Length > 0)
{
session.NowPlayingQueue = nowPlayingQueue;
- }
-
- var itemIds = session.NowPlayingQueue.Select(queue => queue.Id).ToArray();
- session.NowPlayingQueueFullItems = _dtoService.GetBaseItemDtos(_libraryManager.GetItemList(new InternalItemsQuery {
- ItemIds = itemIds,
- }), new DtoOptions(true)).ToArray();
+ var itemIds = nowPlayingQueue.Select(queue => queue.Id).ToArray();
+ session.NowPlayingQueueFullItems = _dtoService.GetBaseItemDtos(
+ _libraryManager.GetItemList(new InternalItemsQuery { ItemIds = itemIds }),
+ new DtoOptions(true));
+ }
}
/// <summary>
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index b7edb2c7c..c2ca23386 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -39,6 +39,8 @@ namespace MediaBrowser.Controller.Session
AdditionalUsers = Array.Empty<SessionUserInfo>();
PlayState = new PlayerStateInfo();
SessionControllers = Array.Empty<ISessionController>();
+ NowPlayingQueue = Array.Empty<QueueItem>();
+ NowPlayingQueueFullItems = Array.Empty<BaseItemDto>();
}
public PlayerStateInfo PlayState { get; set; }
@@ -219,9 +221,9 @@ namespace MediaBrowser.Controller.Session
}
}
- public QueueItem[] NowPlayingQueue { get; set; }
+ public IReadOnlyList<QueueItem> NowPlayingQueue { get; set; }
- public BaseItemDto[] NowPlayingQueueFullItems { get; set; }
+ public IReadOnlyList<BaseItemDto> NowPlayingQueueFullItems { get; set; }
public bool HasCustomDeviceName { get; set; }