Added downloading capabilities in the gui
This commit is contained in:
@@ -2,7 +2,7 @@ use camino::Utf8PathBuf;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
|
||||
#[derive(Debug, Parser, Default)]
|
||||
#[derive(Debug, Parser, Default, Clone)]
|
||||
pub struct CliArgs {
|
||||
/// Show more info
|
||||
#[arg(long, short)]
|
||||
@@ -25,7 +25,7 @@ pub struct CliArgs {
|
||||
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
#[derive(Debug, Subcommand, Clone)]
|
||||
pub enum CliCommand {
|
||||
Download,
|
||||
Add {
|
||||
@@ -34,7 +34,7 @@ pub enum CliCommand {
|
||||
#[arg(long, short)]
|
||||
name: Option<String>,
|
||||
#[arg(long, short)]
|
||||
genre: Option<String>
|
||||
playlist: Option<String>
|
||||
},
|
||||
Gui
|
||||
}
|
||||
|
||||
@@ -12,25 +12,25 @@ use self::cli::CliArgs;
|
||||
// const YTDLP_DL_URL: &'static str = "https://github.com/yt-dlp/yt-dlp/archive/refs/heads/master.zip";
|
||||
// const SPOTDL_DL_URL: &'static str = "https://github.com/spotDL/spotify-downloader/archive/refs/heads/master.zip";
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct ConfigWrapper {
|
||||
pub cfg: Config,
|
||||
pub cli: cli::CliArgs,
|
||||
pub isatty: bool
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
|
||||
pub struct Config {
|
||||
pub ytdlp: ConfigYtdlp,
|
||||
pub spotdl: ConfigSpotdl,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
|
||||
pub struct ConfigYtdlp {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
|
||||
pub struct ConfigSpotdl {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user