]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fetch_list_of_active_groups.cpp
Fix list of finished groups; don't show elimination/seeding groups, show finished...
[ccbs] / bigscreen / fetch_list_of_active_groups.cpp
index 1df67585ce55c94d15816dde7dc3226445173d4d..ae5b29056c823dfd2a3e857d1c26ec981ba71726 100644 (file)
@@ -1,6 +1,6 @@
 #include "fetch_list_of_active_groups.h"
 
-FetchListOfActiveGroups::FetchListOfActiveGroups(std::vector<Group> *active) : active(active) {}
+FetchListOfActiveGroups::FetchListOfActiveGroups(std::vector<SkeletonGroup> *active) : active(active) {}
 void FetchListOfActiveGroups::operator() (pqxx::transaction<> &t)
 {
        // make sure we start with an empty list
@@ -8,11 +8,13 @@ void FetchListOfActiveGroups::operator() (pqxx::transaction<> &t)
        
        pqxx::result res( t.exec("SELECT * FROM bigscreen.active_groups") );
        for (pqxx::result::const_iterator i = res.begin(); i != res.end(); ++i) {
-               Group g;
+               SkeletonGroup g;
 
                g.tournament = i["tournament"].as(g.tournament);
                g.round = i["round"].as(g.round);
                g.parallel = i["parallel"].as(g.parallel);
+               g.num_machines = i["num_machines"].as(g.num_machines);
+               g.players_per_machine = i["players_per_machine"].as(g.players_per_machine);
 
                active->push_back(g);
        }