add limits to places where offsets to avoid some syntax problems. Rename grooveplayer class to avoid conflict with official libgroove class. Add admin event. Write start of event loop that picks initial song.
This commit is contained in:
@@ -32,21 +32,21 @@ namespace std {
|
||||
namespace filesystem = experimental::filesystem;
|
||||
}
|
||||
|
||||
class GroovePlayer
|
||||
class GroovePlayerMgr
|
||||
{
|
||||
public:
|
||||
static std::filesystem::path musicScanDir;
|
||||
static GroovePlayer* getInstance() {
|
||||
static GroovePlayer instance("music.db");
|
||||
static GroovePlayerMgr* getInstance() {
|
||||
static GroovePlayerMgr instance("music.db");
|
||||
musicScanDir = std::filesystem::path("music");
|
||||
return &instance;
|
||||
};
|
||||
GroovePlayer(GroovePlayer const&) = delete;
|
||||
void operator=(GroovePlayer const&) = delete;
|
||||
GroovePlayerMgr ( GroovePlayerMgr const&) = delete;
|
||||
void operator=( GroovePlayerMgr const&) = delete;
|
||||
private:
|
||||
enum PlayerEvents {NOTHING, GROOVE_NOWPLAYING, VOTING_ENDED, VOTE_CAST, PLAYING_PAUSED, PLAYING_RESUMED, SKIP_REQUESTED, SKIP_VOTE_CAST, SKIP_VOTING_ENDED};
|
||||
enum PlayerEvents {NOTHING, GROOVE_NOWPLAYING, VOTING_ENDED, VOTE_CAST, PLAYING_PAUSED, PLAYING_RESUMED, SKIP_REQUESTED, SKIP_VOTE_CAST, SKIP_VOTING_ENDED, ADMIN_FORCE_SKIP};
|
||||
|
||||
GroovePlayer(std::string dbFile);
|
||||
GroovePlayerMgr (std::string dbFile);
|
||||
Wt::Dbo::backend::Sqlite3 sqliteConnection;
|
||||
Wt::Dbo::Session sqlSession;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user