Currently we're simply parsing the audio/${mimeType} mimetype and appending the mimetype as the file extensions. This method works well for containers where the file extension matches the mimetype - for example flac - but for containers where these don't match - like mp3 which uses audio/mpeg - this leads to undesirable behaviours. For example downloads with an .mpeg - while totally playable - extensions are shown in the gallery.
We should thus maintain a list which maps mimetype to extension for the most common containers and parse them for example like this:
Description
Currently we're simply parsing the
audio/${mimeType}
mimetype and appending the mimetype as the file extensions. This method works well for containers where the file extension matches the mimetype - for exampleflac
- but for containers where these don't match - like mp3 which usesaudio/mpeg
- this leads to undesirable behaviours. For example downloads with an.mpeg
- while totally playable - extensions are shown in the gallery.We should thus maintain a list which maps mimetype to extension for the most common containers and parse them for example like this:
Reference: https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Model/Net/MimeTypes.cs
Understanding that boum is open-source software