Merge pull request #3846 from YouKnowBlom/fix-cc-hls

Avoid including stray commas in HLS codecs field
This commit is contained in:
Bond-009 2020-08-09 16:51:48 +02:00 committed by GitHub
commit f4302822f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1496,9 +1496,14 @@ namespace Jellyfin.Api.Controllers
StringBuilder codecs = new StringBuilder();
codecs.Append(videoCodecs)
.Append(',')
.Append(audioCodecs);
codecs.Append(videoCodecs);
if (!string.IsNullOrEmpty(videoCodecs) && !string.IsNullOrEmpty(audioCodecs))
{
codecs.Append(',');
}
codecs.Append(audioCodecs);
if (codecs.Length > 1)
{