fix: made formatting a bit better

This commit is contained in:
Kaley, Fischer 2024-10-22 16:35:36 +02:00
parent 1b015de156
commit 220fab1f22
3 changed files with 7 additions and 9 deletions

View file

@ -16,7 +16,7 @@ std::string pass;
std::string gameid;
std::string dir;
int ab = 0;
bool ab = false;
// slashing
int slashtp = 0;

View file

@ -58,7 +58,6 @@ int main(int argc, char **argv, char **envp) {
inputCmd.dir = ARGS[1 + 5];
}
inputCmd.ab = 0;
try {
getHttp(&inputCmd, std::string{"https://steamcommunity.com/sharedfiles/filedetails/?id=" + inputCmd.collectionid});
} catch (std::string &meow) {
@ -78,7 +77,6 @@ int main(int argc, char **argv, char **envp) {
inputCmd.dir = ARGS[1 + 3];
}
inputCmd.ab = 0;
try {
getHttp(&inputCmd, std::string{"https://steamcommunity.com/sharedfiles/filedetails/?id=" + inputCmd.collectionid});
} catch (std::string &meow) {
@ -111,7 +109,7 @@ int main(int argc, char **argv, char **envp) {
inputCmd.dir = ARGS[1 + 5];
}
inputCmd.ab = 1;
inputCmd.ab = true;
break;
}
@ -124,7 +122,7 @@ int main(int argc, char **argv, char **envp) {
inputCmd.dir = ARGS[1 + 3];
}
inputCmd.ab = 1;
inputCmd.ab = true;
break;
} else {
std::cerr << HELP;

View file

@ -56,7 +56,7 @@ void showLoadingCursor(std::atomic<bool>& running) {
}
void maincommand(cmd *inputCmd) {
std::string idsm = (inputCmd->ab == 1) ? R"( +workshop_download_item )" + inputCmd->gameid + " " + inputCmd->modid + " +quit": R"()";
std::string idsm = R"( +workshop_download_item )" + inputCmd->gameid + " " + inputCmd->modid + " +quit";
std::string maincommand2 = std::string{"sh ~/Steam/steamcmd.sh +force_install_dir "
+ inputCmd->dir
@ -64,7 +64,7 @@ void maincommand(cmd *inputCmd) {
+ inputCmd->user
+ ((inputCmd->pass.empty()) ? "" : inputCmd->pass)
+ " "
+ ((inputCmd->ab == 1) ? idsm: inputCmd->ids)}.c_str();
+ ((inputCmd->ab == true) ? idsm: inputCmd->ids)}.c_str();
try {
std::atomic<bool> running(true);
@ -78,8 +78,8 @@ void maincommand(cmd *inputCmd) {
}
// mod or collection?
std::string total = (!inputCmd->modid.empty()) ? "Total: 1" : "Total: " + std::to_string(inputCmd->slashtp -1) + "\n";
std::string colm = (inputCmd->ab == 1) ? R"(Mod)": R"(Collection)";
std::string total = (inputCmd->ab == true) ? "Total: 1" : "Total: " + std::to_string(inputCmd->slashtp -1) + "\n";
std::string colm = (inputCmd->ab == true) ? R"(Mod)" : R"(Collection)";
// shows how much and what has downloaded
std::string mods = total