Merge pull request #1629 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-04-04 21:28:50 -04:00
commit e092eaec9e

View File

@ -160,6 +160,16 @@ namespace MediaBrowser.Model.Dto
public bool? IsSecondaryAudio(MediaStream stream) public bool? IsSecondaryAudio(MediaStream stream)
{ {
// Look for the first audio track marked as default
foreach (MediaStream currentStream in MediaStreams)
{
if (currentStream.Type == MediaStreamType.Audio && currentStream.IsDefault)
{
return currentStream.Index != stream.Index;
}
}
// Look for the first audio track
foreach (MediaStream currentStream in MediaStreams) foreach (MediaStream currentStream in MediaStreams)
{ {
if (currentStream.Type == MediaStreamType.Audio) if (currentStream.Type == MediaStreamType.Audio)