PlayQueue: play/add the whole track list if no selection performed

This commit is contained in:
emeric
2014-11-20 23:09:22 +01:00
parent 81d758b420
commit 792211368b
4 changed files with 31 additions and 2 deletions
+18
View File
@@ -171,5 +171,23 @@ TrackView::getSelectedTracks(std::vector<Database::Track::id_type>& track_ids)
LMS_LOG(MOD_UI, SEV_DEBUG) << "Getting all selected tracks DONE...";
}
void
TrackView::getTracks(std::vector<Database::Track::id_type>& trackIds)
{
LMS_LOG(MOD_UI, SEV_DEBUG) << "Getting all tracks...";
for (int i = 0; i < _queryModel.rowCount(); ++i)
{
const ResultType& result = _queryModel.resultRow( i );
// Get the track part
Wt::Dbo::ptr<Database::Track> track ( result.get<0>() );
trackIds.push_back(track.id());
}
LMS_LOG(MOD_UI, SEV_DEBUG) << "Getting all tracks done!";
}
} // namespace UserInterface