From ce4894b114cc0610c78f9ee0bc6a6c56735dac0d Mon Sep 17 00:00:00 2001 From: Jonas Minnberg Date: Tue, 29 Jul 2014 15:36:07 +0200 Subject: [PATCH] Small fix --- README.md | 6 +++--- src/ChipMachine_keys.cpp | 4 ++-- src/PlayTracker.h | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6e08173..594123e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/ChipMachine_keys.cpp b/src/ChipMachine_keys.cpp index 90ed319..07154b3 100644 --- a/src/ChipMachine_keys.cpp +++ b/src/ChipMachine_keys.cpp @@ -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); }); } } /* diff --git a/src/PlayTracker.h b/src/PlayTracker.h index 235ecd1..4bcdf6d 100644 --- a/src/PlayTracker.h +++ b/src/PlayTracker.h @@ -54,7 +54,7 @@ class PlayTracker { }); } - void sendList(const std::vector &songs, const std::string &name) { + void sendList(const std::vector &songs, const std::string &name, const std::function done) { JSon json; json.add("uid", std::to_string(trackid)); json.add("name", name); @@ -66,6 +66,7 @@ class PlayTracker { } rpc.post("set_list", json.to_string(), [=](const std::string &result) { LOGD("set_list done:" + result); + done(); }); }