Skip to content

Commit

Permalink
re-enable buddyshares and db rescan
Browse files Browse the repository at this point in the history
  • Loading branch information
KenjiTakahashi committed Feb 23, 2014
1 parent b848aa4 commit 6c8c03d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/newsoul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ bool newsoul::Newsoul::parseDatabase(int *i, int argc, char *argv[]) {
for(; *i < argc; ++*i) {
std::string carg(argv[*i]);
if(carg == "rescan") {
//TODO
for(const std::string &dir : this->_config->getVec({"database", "global", "paths"})) {
this->_globalShares->add({dir});
}
for(const std::string &dir : this->_config->getVec({"database", "local", "paths"})) {
this->_buddyShares->add({dir});
}
} else if(carg == "global") {
this->parsePart({
{"list", [this](const std::string &sarg){
Expand Down Expand Up @@ -197,11 +202,11 @@ bool newsoul::Newsoul::parseDatabase(int *i, int argc, char *argv[]) {
}},
{"add", [this, i, argc, argv](const std::string &sarg){
this->parsePAdd({"database", "buddy", "paths"}, i, argc, argv);
//TODO: add to db
this->_buddyShares->add({argv[*i]});
}},
{"remove", [this, i, argc, argv](const std::string &sarg){
this->parsePDel({"database", "buddy", "paths"}, i, argc, argv);
//TODO: remove from db
this->_buddyShares->remove({argv[*i]});
}},
{"enabled", [this, i, argc, argv](const std::string &sarg){
this->parsePSetBool({"database", "buddy", "enabled"}, i, argc, argv);
Expand Down

0 comments on commit 6c8c03d

Please sign in to comment.