Avoid including stray commas in HLS codecs field

This commit is contained in:
Andreas B 2020-08-09 16:44:46 +02:00
parent 75bb127599
commit 542185fba4

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)
{