mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 19:32:57 +01:00
update program titles
This commit is contained in:
@@ -175,6 +175,15 @@ namespace MediaBrowser.Api.Playback
|
||||
return ToOptimizedResult(info);
|
||||
}
|
||||
|
||||
private T Clone<T>(T obj)
|
||||
{
|
||||
// Since we're going to be setting properties on MediaSourceInfos that come out of _mediaSourceManager, we should clone it
|
||||
// Should we move this directly into MediaSourceManager?
|
||||
|
||||
var json = _json.SerializeToString(obj);
|
||||
return _json.DeserializeFromString<T>(json);
|
||||
}
|
||||
|
||||
private async Task<PlaybackInfoResponse> GetPlaybackInfo(string id, string userId, string[] supportedLiveMediaTypes, string mediaSourceId = null, string liveStreamId = null)
|
||||
{
|
||||
var result = new PlaybackInfoResponse();
|
||||
@@ -217,6 +226,8 @@ namespace MediaBrowser.Api.Playback
|
||||
}
|
||||
else
|
||||
{
|
||||
result.MediaSources = Clone(result.MediaSources);
|
||||
|
||||
result.PlaySessionId = Guid.NewGuid().ToString("N");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user