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(); }); }