Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sasq64 committed Jul 29, 2014
1 parent a35ddf9 commit ce4894b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ For UADE support;

Chipmachine binary;

# git clone --depth 1 https://github.com/sasq64/cpp-mods.git
# git clone --depth 1 https://github.com/sasq64/chipmachine.git
# git clone --depth 1 https://github.com/sasq64/demofx.git
# git clone https://github.com/sasq64/cpp-mods.git
# git clone https://github.com/sasq64/chipmachine.git
# git clone https://github.com/sasq64/demofx.git
# cd chipmachine
# make -j8

Expand Down
4 changes: 2 additions & 2 deletions src/ChipMachine_keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ void ChipMachine::update_keys() {
f.write(userName);
f.close();
auto plist = PlaylistDatabase::getInstance().getPlaylist(currentPlaylistName);
PlayTracker::getInstance().sendList(plist.songs, plist.name);
PlayTracker::getInstance().sendList(plist.songs, plist.name, [=]() { toast("Uploaded", 2); });
});
});
renderSet.add(currentDialog);
} else {
auto plist = PlaylistDatabase::getInstance().getPlaylist(currentPlaylistName);
PlayTracker::getInstance().sendList(plist.songs, plist.name);
PlayTracker::getInstance().sendList(plist.songs, plist.name, [=]() { toast("Uploaded", 2); });
}
}
/*
Expand Down
3 changes: 2 additions & 1 deletion src/PlayTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PlayTracker {
});
}

void sendList(const std::vector<SongInfo> &songs, const std::string &name) {
void sendList(const std::vector<SongInfo> &songs, const std::string &name, const std::function<void()> done) {
JSon json;
json.add("uid", std::to_string(trackid));
json.add("name", name);
Expand All @@ -66,6 +66,7 @@ class PlayTracker {
}
rpc.post("set_list", json.to_string(), [=](const std::string &result) {
LOGD("set_list done:" + result);
done();
});
}

Expand Down

0 comments on commit ce4894b

Please sign in to comment.