aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2024-05-21 14:55:42 +0200
committerBond_009 <bond.009@outlook.com>2024-05-21 14:55:42 +0200
commit69ae006f3733cc622cede05bf8de3c0fe226a155 (patch)
tree23ef15eea1f0cb393023ac9cb35995cb84557abe
parent03c23e15b3f62c7fd8418a25c01e121e4268fc6f (diff)
Prefer profile over codec for display title
FFmpeg 6.1 and newer can recognize Dolby Atmos and DTS:X. This change makes it possible to see if a track has one of these technologies if the used FFmpeg supports it.
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 0d2d7c696..3e01c6efc 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -267,13 +267,13 @@ namespace MediaBrowser.Model.Entities
attributes.Add(StringHelper.FirstToUpper(fullLanguage ?? Language));
}
- if (!string.IsNullOrEmpty(Codec) && !string.Equals(Codec, "dca", StringComparison.OrdinalIgnoreCase) && !string.Equals(Codec, "dts", StringComparison.OrdinalIgnoreCase))
+ if (!string.IsNullOrEmpty(Profile) && !string.Equals(Profile, "lc", StringComparison.OrdinalIgnoreCase))
{
- attributes.Add(AudioCodec.GetFriendlyName(Codec));
+ attributes.Add(Profile);
}
- else if (!string.IsNullOrEmpty(Profile) && !string.Equals(Profile, "lc", StringComparison.OrdinalIgnoreCase))
+ else if (!string.IsNullOrEmpty(Codec))
{
- attributes.Add(Profile);
+ attributes.Add(AudioCodec.GetFriendlyName(Codec));
}
if (!string.IsNullOrEmpty(ChannelLayout))