Added WavPack support. fixes #195
This commit is contained in:
@@ -119,7 +119,6 @@ Transcoder::start()
|
|||||||
args.emplace_back("-b:a");
|
args.emplace_back("-b:a");
|
||||||
args.emplace_back(std::to_string(_parameters.bitrate));
|
args.emplace_back(std::to_string(_parameters.bitrate));
|
||||||
|
|
||||||
|
|
||||||
// Codecs and formats
|
// Codecs and formats
|
||||||
switch (_parameters.format)
|
switch (_parameters.format)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,16 +24,15 @@
|
|||||||
|
|
||||||
#include "Types.hpp"
|
#include "Types.hpp"
|
||||||
|
|
||||||
namespace Av {
|
namespace Av
|
||||||
|
|
||||||
struct TranscodeParameters
|
|
||||||
{
|
{
|
||||||
Format format;
|
struct TranscodeParameters
|
||||||
std::size_t bitrate {128000};
|
{
|
||||||
std::optional<std::size_t> stream; // Id of the stream to be transcoded (auto detect by default)
|
Format format;
|
||||||
std::chrono::milliseconds offset {0};
|
std::size_t bitrate {128000};
|
||||||
bool stripMetadata {true};
|
std::optional<std::size_t> stream; // Id of the stream to be transcoded (auto detect by default)
|
||||||
};
|
std::chrono::milliseconds offset {0};
|
||||||
|
bool stripMetadata {true};
|
||||||
|
};
|
||||||
} // namespace Av
|
} // namespace Av
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,11 @@ namespace Av {
|
|||||||
|
|
||||||
enum class Format
|
enum class Format
|
||||||
{
|
{
|
||||||
// Values are important and must not be changed (stored in the UI's localstorage)
|
MP3,
|
||||||
MP3 = 0,
|
OGG_OPUS,
|
||||||
OGG_OPUS = 1,
|
MATROSKA_OPUS,
|
||||||
MATROSKA_OPUS = 2,
|
OGG_VORBIS,
|
||||||
OGG_VORBIS = 3,
|
WEBM_VORBIS,
|
||||||
WEBM_VORBIS = 4,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string_view formatToMimetype(Format format);
|
std::string_view formatToMimetype(Format format);
|
||||||
|
|||||||
@@ -542,6 +542,13 @@ CREATE TABLE "listen" (
|
|||||||
migrateListens("__scrobbler_listenbrainz_history__", Scrobbler::ListenBrainz);
|
migrateListens("__scrobbler_listenbrainz_history__", Scrobbler::ListenBrainz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void
|
||||||
|
migrateFromV32(Session& session)
|
||||||
|
{
|
||||||
|
ScanSettings::get(session).modify()->addAudioFileExtension(".wv");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
doDbMigration(Session& session)
|
doDbMigration(Session& session)
|
||||||
{
|
{
|
||||||
@@ -580,6 +587,7 @@ CREATE TABLE "listen" (
|
|||||||
{29, migrateFromV29},
|
{29, migrateFromV29},
|
||||||
{30, migrateFromV30},
|
{30, migrateFromV30},
|
||||||
{31, migrateFromV31},
|
{31, migrateFromV31},
|
||||||
|
{32, migrateFromV32},
|
||||||
};
|
};
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Database
|
|||||||
class Session;
|
class Session;
|
||||||
|
|
||||||
using Version = std::size_t;
|
using Version = std::size_t;
|
||||||
static constexpr Version LMS_DATABASE_VERSION {32};
|
static constexpr Version LMS_DATABASE_VERSION {33};
|
||||||
class VersionInfo
|
class VersionInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class ScanSettings : public Object<ScanSettings, ScanSettingsId>
|
|||||||
Wt::WTime _startTime = Wt::WTime {0,0,0};
|
Wt::WTime _startTime = Wt::WTime {0,0,0};
|
||||||
UpdatePeriod _updatePeriod {UpdatePeriod::Never};
|
UpdatePeriod _updatePeriod {UpdatePeriod::Never};
|
||||||
RecommendationEngineType _recommendationEngineType {RecommendationEngineType::Clusters};
|
RecommendationEngineType _recommendationEngineType {RecommendationEngineType::Clusters};
|
||||||
std::string _audioFileExtensions {".alac .mp3 .ogg .oga .aac .m4a .m4b .flac .wav .wma .aif .aiff .ape .mpc .shn .opus"};
|
std::string _audioFileExtensions {".alac .mp3 .ogg .oga .aac .m4a .m4b .flac .wav .wma .aif .aiff .ape .mpc .shn .opus .wv"};
|
||||||
Wt::Dbo::collection<Wt::Dbo::ptr<ClusterType>> _clusterTypes;
|
Wt::Dbo::collection<Wt::Dbo::ptr<ClusterType>> _clusterTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user