Fixed bad content type in case of uppercase file extension
This commit is contained in:
@@ -293,7 +293,7 @@ namespace Av
|
|||||||
// List should be sync with the demuxers shipped in the lms's docker version
|
// List should be sync with the demuxers shipped in the lms's docker version
|
||||||
// + the _audioFileExtensions in ScanSettings
|
// + the _audioFileExtensions in ScanSettings
|
||||||
// std::filesystem::path does not seem to have std::hash specialization on freebsd
|
// std::filesystem::path does not seem to have std::hash specialization on freebsd
|
||||||
static const std::map<std::filesystem::path, std::string_view> entries
|
static const std::unordered_map<std::string, std::string_view> entries
|
||||||
{
|
{
|
||||||
{".mp3", "audio/mpeg"},
|
{".mp3", "audio/mpeg"},
|
||||||
{".ogg", "audio/ogg"},
|
{".ogg", "audio/ogg"},
|
||||||
@@ -320,7 +320,7 @@ namespace Av
|
|||||||
{".mka", "audio/x-matroska"},
|
{".mka", "audio/x-matroska"},
|
||||||
};
|
};
|
||||||
|
|
||||||
auto it{ entries.find(fileExtension) };
|
auto it{ entries.find(StringUtils::stringToLower(fileExtension.string())) };
|
||||||
if (it == std::cend(entries))
|
if (it == std::cend(entries))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user