support theme songs in the web client

This commit is contained in:
Luke Pulverenti
2014-04-14 23:54:52 -04:00
parent 2913638b67
commit e89d4e605b
14 changed files with 189 additions and 47 deletions

View File

@@ -187,7 +187,7 @@ namespace MediaBrowser.Api.Playback
if (!state.HasMediaStreams)
{
return state.IsInputVideo ? "-map -0:s" : string.Empty;
return state.IsInputVideo ? "-sn" : string.Empty;
}
if (state.VideoStream != null)
@@ -1493,7 +1493,7 @@ namespace MediaBrowser.Api.Playback
if (videoRequest != null)
{
if (state.VideoStream != null && CanStreamCopyVideo(videoRequest, state.VideoStream, state.VideoType))
if (state.VideoStream != null && CanStreamCopyVideo(videoRequest, state.VideoStream))
{
videoRequest.VideoCodec = "copy";
}
@@ -1507,19 +1507,13 @@ namespace MediaBrowser.Api.Playback
return state;
}
private bool CanStreamCopyVideo(VideoStreamRequest request, MediaStream videoStream, VideoType videoType)
private bool CanStreamCopyVideo(VideoStreamRequest request, MediaStream videoStream)
{
if (videoStream.IsInterlaced)
{
return false;
}
// Not going to attempt this with folder rips
if (videoType != VideoType.VideoFile)
{
return false;
}
// Source and target codecs must match
if (!string.Equals(request.VideoCodec, videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{