prioritize default audio streams (#1154)
This commit is contained in:
@@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Changed
|
||||
- Merge generated `Other Video` folder tags with tags from sidecar NFO
|
||||
- Prioritize audio streams that are flagged as "default" when multiple candidate streams are available
|
||||
- For example, a video with a stereo commentary track and a stereo "default" track will now prefer the "default" track
|
||||
|
||||
## [0.7.3-beta] - 2023-01-25
|
||||
### Added
|
||||
|
||||
@@ -233,7 +233,7 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector
|
||||
if (string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
_logger.LogDebug("No audio title has been specified; selecting stream with most channels");
|
||||
return streams.OrderByDescending(s => s.Channels).Head();
|
||||
return streams.OrderByDescending(s => s.Channels).ThenByDescending(s => s.Default).Head();
|
||||
}
|
||||
|
||||
// prioritize matching titles
|
||||
@@ -247,14 +247,14 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector
|
||||
matchingTitle.Count,
|
||||
title);
|
||||
|
||||
return matchingTitle.OrderByDescending(s => s.Channels).Head();
|
||||
return matchingTitle.OrderByDescending(s => s.Channels).ThenByDescending(s => s.Default).Head();
|
||||
}
|
||||
|
||||
_logger.LogDebug(
|
||||
"Unable to find audio stream with preferred title {Title}; selecting stream with most channels",
|
||||
title);
|
||||
|
||||
return streams.OrderByDescending(s => s.Channels).Head();
|
||||
return streams.OrderByDescending(s => s.Channels).ThenByDescending(s => s.Default).Head();
|
||||
}
|
||||
|
||||
private async Task<Option<MediaStream>> SelectEpisodeAudioStream(
|
||||
|
||||
Reference in New Issue
Block a user