mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
fix(livetv): use MediaType instead of ToString and add text/ as disallowed mimetypes
This commit is contained in:
parent
26714e2c62
commit
c647143e53
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user