Added basic download input logic

This commit is contained in:
2026-06-14 16:29:03 -04:00
parent a2ac669803
commit a24d2d6443

View File

@@ -3,15 +3,27 @@
#include <iostream>
#include <string>
int main(int argc, char **argv) {
CLI::App app{"Spotify Downloader"};
std::string url;
app.require_subcommand(1);
app.add_option("-u,--url", url, "Spotify item URL");
auto *cmd_download =
app.add_subcommand("download", "Download tracks directly");
auto *cmd_convert =
app.add_subcommand("convert", "Convert assets between platforms");
std::string url;
cmd_download->add_option("url", url, "Target URL for Playlist or Song")
->required();
std::string output;
cmd_download->add_option("output", output, "Output filename or directory")
->required(false);
CLI11_PARSE(app, argc, argv);
if (!url.empty()) {
if (cmd_download->parsed()) {
std::cout << "Target URL: " << url << "\n";
}