diff options
| author | cvium <cvium@users.noreply.github.com> | 2024-05-17 13:51:57 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-05-17 13:51:57 -0400 |
| commit | 01946c6ef58fee737ae03aacd0bc0f32a5b8226e (patch) | |
| tree | a2605c2d9c310674e0573fb2d0ddd045df2035f1 | |
| parent | 4ded042dde3fc14201a5f8e6d3dfaca1b889ff22 (diff) | |
Backport pull request #11699 from jellyfin/release-10.9.z
Use MediaType instead of ToString and add text/ as disallowed mimetypes
Original-merge: 46c748d8884d81c5a8ff2ecb5cc1caa9beb83356
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | src/Jellyfin.LiveTv/TunerHosts/M3UTunerHost.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Jellyfin.LiveTv/TunerHosts/M3UTunerHost.cs b/src/Jellyfin.LiveTv/TunerHosts/M3UTunerHost.cs index 97090e442..c1e1a7bda 100644 --- a/src/Jellyfin.LiveTv/TunerHosts/M3UTunerHost.cs +++ b/src/Jellyfin.LiveTv/TunerHosts/M3UTunerHost.cs @@ -32,6 +32,8 @@ namespace Jellyfin.LiveTv.TunerHosts { private static readonly string[] _disallowedMimeTypes = { + "text/plain", + "text/html", "video/x-matroska", "video/mp4", "application/vnd.apple.mpegurl", @@ -118,7 +120,7 @@ namespace Jellyfin.LiveTv.TunerHosts if (response.IsSuccessStatusCode) { - if (!_disallowedMimeTypes.Contains(response.Content.Headers.ContentType?.ToString(), StringComparison.OrdinalIgnoreCase)) + if (!_disallowedMimeTypes.Contains(response.Content.Headers.ContentType?.MediaType, StringComparison.OrdinalIgnoreCase)) { return new SharedHttpStream(mediaSource, tunerHost, streamId, FileSystem, _httpClientFactory, Logger, Config, _appHost, _streamHelper); } |
