aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
diff options
context:
space:
mode:
authorMarius Luca <marius@dreamer-ge.com>2021-11-28 11:42:51 +0200
committerMarius Luca <marius@dreamer-ge.com>2021-12-09 17:52:51 +0200
commit7d86ef6f227aadf5a5f2992fb0f52ba69e07b3cb (patch)
tree36dde408b39292708a1e9c8aa73d83f4dd3e6190 /Jellyfin.Api/Helpers/DynamicHlsHelper.cs
parent13ac3e3665468bb43edb5e7b05f3059089ab8297 (diff)
- add an option for dropping specific subtitle formats using the DLNA SubtitleProfile
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
-rw-r--r--Jellyfin.Api/Helpers/DynamicHlsHelper.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
index 4abe4c5d5..02af2e435 100644
--- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
+++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -462,6 +462,11 @@ namespace Jellyfin.Api.Helpers
private void AddSubtitles(StreamState state, IEnumerable<MediaStream> subtitles, StringBuilder builder, ClaimsPrincipal user)
{
+ if (state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Drop)
+ {
+ return;
+ }
+
var selectedIndex = state.SubtitleStream == null || state.SubtitleDeliveryMethod != SubtitleDeliveryMethod.Hls ? (int?)null : state.SubtitleStream.Index;
const string Format = "#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"{0}\",DEFAULT={1},FORCED={2},AUTOSELECT=YES,URI=\"{3}\",LANGUAGE=\"{4}\"";