mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-11 20:56:32 +00:00
display additional transcoding info in dashboard
This commit is contained in:
@@ -347,6 +347,11 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
{
|
||||
session.NowPlayingItem = null;
|
||||
session.PlayState = new PlayerStateInfo();
|
||||
|
||||
if (!string.IsNullOrEmpty(session.DeviceId))
|
||||
{
|
||||
ClearTranscodingInfo(session.DeviceId);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetSessionKey(string clientType, string appVersion, string deviceId)
|
||||
@@ -459,6 +464,11 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
|
||||
UpdateNowPlayingItem(session, info, libraryItem);
|
||||
|
||||
if (!string.IsNullOrEmpty(session.DeviceId))
|
||||
{
|
||||
ClearTranscodingInfo(session.DeviceId);
|
||||
}
|
||||
|
||||
session.QueueableMediaTypes = info.QueueableMediaTypes;
|
||||
|
||||
var users = GetUsers(session);
|
||||
@@ -1264,7 +1274,8 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
UserName = session.UserName,
|
||||
NowPlayingItem = session.NowPlayingItem,
|
||||
SupportsRemoteControl = session.SupportsMediaControl,
|
||||
PlayState = session.PlayState
|
||||
PlayState = session.PlayState,
|
||||
TranscodingInfo = session.TranscodingInfo
|
||||
};
|
||||
|
||||
if (session.UserId.HasValue)
|
||||
@@ -1490,5 +1501,20 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
|
||||
session.NowViewingItem = item;
|
||||
}
|
||||
|
||||
public void ReportTranscodingInfo(string deviceId, TranscodingInfo info)
|
||||
{
|
||||
var session = Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId));
|
||||
|
||||
if (session != null)
|
||||
{
|
||||
session.TranscodingInfo = info;
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearTranscodingInfo(string deviceId)
|
||||
{
|
||||
ReportTranscodingInfo(deviceId, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user