Stop using pointers from DB as storage mechanism. Start storing copies of the object itself. Use commits after methods are done with transaction to hopefully help with DB issues. Don't use map because it requires too much about the key object I don't need. Add boolean that prevents vote end from being called constantly during it's 3 second window.

This commit is contained in:
Kevin Whitaker
2017-02-05 18:20:03 -05:00
parent 75c87c41f8
commit cb5b2f7ad6
4 changed files with 71 additions and 61 deletions

View File

@@ -31,12 +31,12 @@ public:
WebInterface(const Wt::WEnvironment& env);
~WebInterface();
void loginCompleted();
void playPauseActionFromServer(User* userPausing);
void songChangedFromServer(const AudioTrack* nextTrack);
void voteTracksUpdatedFromServer(std::list<const AudioTrack*> voteableTracks);
void skipVotedFromServer(User* userRequestingToSkipCurrentTrack);
void voteUpdateFromServer(User* userVoting, bool forSkip);
void voteNextSongFromServer(User* userVoting, const AudioTrack* trackVoted);
void playPauseActionFromServer(User userPausing);
void songChangedFromServer(AudioTrack nextTrack);
void voteTracksUpdatedFromServer(std::list<AudioTrack> voteableTracks);
void skipVotedFromServer(User userRequestingToSkipCurrentTrack);
void voteUpdateFromServer(User userVoting, bool forSkip);
void voteNextSongFromServer(User userVoting, AudioTrack trackVoted);
void voteNextPollClosedFromServer();
private:
struct internal;