mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #6941] [MERGED] Use MimeTypes package to determine MIME type #11203
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/6941
Author: @holahmeds
Created: 12/4/2021
Status: ✅ Merged
Merged: 12/5/2021
Merged by: @crobibero
Base:
master← Head:mime-type📝 Commits (5)
6193fdeUse MimeTypes package to determine MIME type40e05a7Update documentation0e49102Refactor MimeTypes.ToExtension()fa6f651Update unit test namecf75f99Update unit test name📊 Changes
3 files changed (+218 additions, -99 deletions)
View changed files
📝
MediaBrowser.Model/MediaBrowser.Model.csproj(+4 -0)📝
MediaBrowser.Model/Net/MimeTypes.cs(+50 -99)➕
tests/Jellyfin.Model.Tests/Net/MimeTypesTests.cs(+164 -0)📄 Description
This simplifies the code since we don't have to keep large mappings of extensions and MIME types. The current method is also reportedly error prone (#494).
We still keep the ability to override the mappings for:
Issues
#494
Library: https://github.com/khellang/MimeTypes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.