Better radio mode

This commit is contained in:
emeric
2018-05-31 20:43:09 +02:00
parent e0ae294abf
commit fff899cecb
6 changed files with 49 additions and 20 deletions
+13
View File
@@ -74,6 +74,19 @@ Cluster::getTracks(int offset, int limit) const
return std::vector<Wt::Dbo::ptr<Track>>(res.begin(), res.end());
}
std::set<IdType>
Cluster::getTrackIds() const
{
assert(session());
assert(IdIsValid(self()->id()));
Wt::Dbo::collection<IdType> res = session()->query<IdType>("SELECT t_c.track_id from track_cluster t_c INNER JOIN cluster c ON c.id = t_c.cluster_id")
.where("c.id = ?").bind(self()->id());
return std::set<IdType>(res.begin(), res.end());
}
ClusterType::ClusterType(std::string name)
: _name(name)