added conf option 'playqueue-max-entry-count'. fixes #293
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "services/database/User.hpp"
|
||||
#include "services/scrobbling/IScrobblingService.hpp"
|
||||
#include "services/recommendation/IPlaylistGeneratorService.hpp"
|
||||
#include "utils/IConfig.hpp"
|
||||
#include "utils/Logger.hpp"
|
||||
#include "utils/Random.hpp"
|
||||
#include "utils/Service.hpp"
|
||||
@@ -117,6 +118,7 @@ namespace
|
||||
|
||||
PlayQueue::PlayQueue()
|
||||
: Template {Wt::WString::tr("Lms.PlayQueue.template")}
|
||||
, _capacity {Service<IConfig>::get()->getULong("playqueue-max-entry-count", 1000)}
|
||||
{
|
||||
initTrackLists();
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class PlayQueue : public Template
|
||||
// Signal emitted when track count changed
|
||||
Wt::Signal<std::size_t> trackCountChanged;
|
||||
|
||||
constexpr std::size_t getCapacity() const { return _capacity; }
|
||||
std::size_t getCapacity() const { return _capacity; }
|
||||
std::size_t getCount();
|
||||
|
||||
private:
|
||||
@@ -99,7 +99,7 @@ class PlayQueue : public Template
|
||||
void exportToNewTrackList(const Wt::WString& name);
|
||||
void exportToTrackList(Database::TrackListId trackList);
|
||||
|
||||
static inline constexpr std::size_t _capacity {1000};
|
||||
const std::size_t _capacity;
|
||||
static inline constexpr std::size_t _batchSize {12};
|
||||
|
||||
bool _mediaPlayerSettingsLoaded {};
|
||||
|
||||
Reference in New Issue
Block a user