added music and game genre image downloading

This commit is contained in:
Luke Pulverenti
2014-01-02 18:07:37 -05:00
parent b50fc351a1
commit a5be2523c5
17 changed files with 636 additions and 52 deletions

View File

@@ -888,11 +888,18 @@ namespace MediaBrowser.Api.Playback
}
else
{
state.MediaPath = string.Format("http://localhost:{0}/mediabrowser/LiveTv/Recordings/{1}/Stream",
ServerConfigurationManager.Configuration.HttpServerPortNumber,
request.Id);
var streamInfo = await LiveTvManager.GetRecordingStream(request.Id, cancellationToken).ConfigureAwait(false);
state.IsRemote = true;
if (!string.IsNullOrEmpty(streamInfo.Path) && File.Exists(streamInfo.Path))
{
state.MediaPath = streamInfo.Path;
state.IsRemote = false;
}
else if (!string.IsNullOrEmpty(streamInfo.Url))
{
state.MediaPath = streamInfo.Url;
state.IsRemote = true;
}
}
itemId = recording.Id;
@@ -905,11 +912,18 @@ namespace MediaBrowser.Api.Playback
state.IsInputVideo = string.Equals(channel.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase);
state.PlayableStreamFileNames = new List<string>();
state.MediaPath = string.Format("http://localhost:{0}/mediabrowser/LiveTv/Channels/{1}/Stream",
ServerConfigurationManager.Configuration.HttpServerPortNumber,
request.Id);
var streamInfo = await LiveTvManager.GetChannelStream(request.Id, cancellationToken).ConfigureAwait(false);
state.IsRemote = true;
if (!string.IsNullOrEmpty(streamInfo.Path) && File.Exists(streamInfo.Path))
{
state.MediaPath = streamInfo.Path;
state.IsRemote = false;
}
else if (!string.IsNullOrEmpty(streamInfo.Url))
{
state.MediaPath = streamInfo.Url;
state.IsRemote = true;
}
itemId = channel.Id;
}