added conf option 'playqueue-max-entry-count'. fixes #293

This commit is contained in:
emeric
2023-02-23 20:05:07 +01:00
parent 2e8ec125e7
commit 1332287bbf
7 changed files with 7 additions and 6 deletions
+2
View File
@@ -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();
+2 -2
View File
@@ -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 {};