update program titles

This commit is contained in:
Luke Pulverenti
2017-01-21 15:27:07 -05:00
parent 0bf95da493
commit 2ef30a3ba8
27 changed files with 288 additions and 286 deletions

View File

@@ -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");
}