Use MediaTypeNames where possible (#13440)

This commit is contained in:
Bond-009
2025-01-27 05:06:24 +01:00
committed by GitHub
parent 7e9ce78849
commit 7684986fa1
4 changed files with 11 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net.Mime;
using Jellyfin.Extensions;
namespace MediaBrowser.Model.Net
@@ -144,7 +145,7 @@ namespace MediaBrowser.Model.Net
new("video/x-matroska", ".mkv"),
}.ToFrozenDictionary(pair => pair.Key, pair => pair.Value, StringComparer.OrdinalIgnoreCase);
public static string GetMimeType(string path) => GetMimeType(path, "application/octet-stream");
public static string GetMimeType(string path) => GetMimeType(path, MediaTypeNames.Application.Octet);
/// <summary>
/// Gets the type of the MIME.