Commit d9ebd4fe authored by Kevin Whitaker's avatar Kevin Whitaker

limit tracks some more. Have track updated in title too.

parent 4e34ce5d
......@@ -67,8 +67,10 @@ void WebInterface::loginCompleted()
priv_int->loginUI->animateHide(Wt::WAnimation(Wt::WAnimation::AnimationEffect::Fade));
priv_int->playerUI->animateShow(Wt::WAnimation(Wt::WAnimation::AnimationEffect::Fade, Wt::WAnimation::TimingFunction::EaseIn, 500));
priv_int->playerUI->updateDetailsFromServer(GroovePlayerMgr::getInstance()->currentTrack);
setTitle("Arbitrateor - Audio Jukebox : ["+GroovePlayerMgr::getInstance()->currentTrack.trackName + "] " + GroovePlayerMgr::getInstance()->currentTrack.trackArtistName);
priv_int->playerUI->updateVoteableTracksFromServer(GroovePlayerMgr::getInstance()->currentVoteBatch);
priv_int->playerUI->updateVoteTrackState();
if(currentUser.canUpload) priv_int->playerUI->mainDisplay->addTab(priv_int->playerUI->uploadPane, "Upload Track", Wt::WTabWidget::LazyLoading);
if(currentUser.isAdmin) priv_int->playerUI->mainDisplay->addTab(priv_int->playerUI->adminPane, "Admin", Wt::WTabWidget::LazyLoading);
}
......@@ -82,6 +84,7 @@ void WebInterface::playPauseActionFromServer(User userPausing, bool pause)
void WebInterface::songChangedFromServer(AudioTrack nextTrack)
{
setTitle("Arbitrateor - Audio Jukebox : ["+nextTrack.trackName + "] " + nextTrack.trackArtistName);
priv_int->playerUI->updateDetailsFromServer(nextTrack);
priv_int->playerUI->requestPane->updateRequestButtonState();
triggerUpdate();
......
......@@ -140,7 +140,7 @@ void RequestInterface::searchClicked()
}
//Do a like search on title, artist, and album on DB
Wt::Dbo::collection<Wt::Dbo::ptr<AudioTrack>> trackOptions = sqlSession.find<AudioTrack>(std::string("where tracks.name like \"%")+searchBox->text().toUTF8()+std::string("%\" OR tracks.artist like \"%")+searchBox->text().toUTF8()+std::string("%\" OR tracks.album like \"%")+searchBox->text().toUTF8()+std::string("%\"")).limit(49);
Wt::Dbo::collection<Wt::Dbo::ptr<AudioTrack>> trackOptions = sqlSession.find<AudioTrack>(std::string("where tracks.name like \"%")+searchBox->text().toUTF8()+std::string("%\" OR tracks.artist like \"%")+searchBox->text().toUTF8()+std::string("%\" OR tracks.album like \"%")+searchBox->text().toUTF8()+std::string("%\"")).limit(30);
//Make sure all items are gone
for(RequestItem* item: foundItems)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment