Start implementing web UI. Add track detail container. Comment out some old test code and DB code while more gets hooked up. Play/pause button is mostly implemented.
This commit is contained in:
@@ -390,16 +390,16 @@ void GroovePlayerMgr::grooveEventLoop()
|
||||
}
|
||||
else if(event.eventType == PLAYING_PAUSED)
|
||||
{
|
||||
//Add action to DB
|
||||
Wt::Dbo::Transaction pauseTransaction(sqlSession);
|
||||
UserAction* action = new UserAction();
|
||||
action->action = UserAction::UAction::PlayPause;
|
||||
action->user = Wt::Dbo::ptr<User>(&event.userInvolved);
|
||||
action->trackInvolved = Wt::Dbo::ptr<AudioTrack>(&event.tracksInvolved.front());
|
||||
action->datetime = Wt::WDateTime::currentDateTime();
|
||||
sqlSession.add(action);
|
||||
pauseTransaction.commit();
|
||||
|
||||
//Add action to DB TODO
|
||||
// Wt::Dbo::Transaction pauseTransaction(sqlSession);
|
||||
// UserAction* action = new UserAction();
|
||||
// action->action = UserAction::UAction::PlayPause;
|
||||
// action->user = Wt::Dbo::ptr<User>(&event.userInvolved);
|
||||
// action->trackInvolved = Wt::Dbo::ptr<AudioTrack>(&event.tracksInvolved.front());
|
||||
// action->datetime = Wt::WDateTime::currentDateTime();
|
||||
// sqlSession.add(action);
|
||||
// pauseTransaction.commit();
|
||||
|
||||
groove_playlist_pause(currentPlaylist);
|
||||
|
||||
//Update vote display on all clients.
|
||||
@@ -414,16 +414,16 @@ void GroovePlayerMgr::grooveEventLoop()
|
||||
}
|
||||
else if(event.eventType == PLAYING_RESUMED)
|
||||
{
|
||||
//Add action to DB
|
||||
Wt::Dbo::Transaction playTransaction(sqlSession);
|
||||
UserAction* action = new UserAction();
|
||||
action->action = UserAction::UAction::PlayPause;
|
||||
action->user = Wt::Dbo::ptr<User>(&event.userInvolved);
|
||||
action->trackInvolved = Wt::Dbo::ptr<AudioTrack>(&event.tracksInvolved.front());
|
||||
action->datetime = Wt::WDateTime::currentDateTime();
|
||||
sqlSession.add(action);
|
||||
playTransaction.commit();
|
||||
|
||||
//Add action to DB TODO
|
||||
// Wt::Dbo::Transaction playTransaction(sqlSession);
|
||||
// UserAction* action = new UserAction();
|
||||
// action->action = UserAction::UAction::PlayPause;
|
||||
// action->user = Wt::Dbo::ptr<User>(&event.userInvolved);
|
||||
// action->trackInvolved = Wt::Dbo::ptr<AudioTrack>(&event.tracksInvolved.front());
|
||||
// action->datetime = Wt::WDateTime::currentDateTime();
|
||||
// sqlSession.add(action);
|
||||
// playTransaction.commit();
|
||||
|
||||
groove_playlist_play(currentPlaylist);
|
||||
|
||||
//Update vote display on all clients.
|
||||
|
||||
Reference in New Issue
Block a user