Merge branch 'develop' for release v3.44.1
This commit is contained in:
@@ -28,6 +28,8 @@ extern "C"
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <map>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/String.hpp"
|
#include "utils/String.hpp"
|
||||||
@@ -290,7 +292,8 @@ 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
|
||||||
static const std::unordered_map<std::filesystem::path, std::string_view> entries
|
// std::filesystem::path does not seem to have std::hash specialization on freebsd
|
||||||
|
static const std::map<std::filesystem::path, std::string_view> entries
|
||||||
{
|
{
|
||||||
{".mp3", "audio/mpeg"},
|
{".mp3", "audio/mpeg"},
|
||||||
{".ogg", "audio/ogg"},
|
{".ogg", "audio/ogg"},
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ FileResourceHandler::processRequest(const Wt::Http::Request& request, Wt::Http::
|
|||||||
|
|
||||||
LMS_LOG(UTILS, DEBUG) << "File '" << _path.string() << "', fileSize = " << fileSize;
|
LMS_LOG(UTILS, DEBUG) << "File '" << _path.string() << "', fileSize = " << fileSize;
|
||||||
|
|
||||||
|
response.addHeader("Accept-Ranges", "bytes");
|
||||||
|
|
||||||
const Wt::Http::Request::ByteRangeSpecifier ranges{ request.getRanges(fileSize) };
|
const Wt::Http::Request::ByteRangeSpecifier ranges{ request.getRanges(fileSize) };
|
||||||
if (!ranges.isSatisfiable())
|
if (!ranges.isSatisfiable())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user