feat: remove play command

This commit is contained in:
Tal 2024-09-26 16:13:40 +02:00
parent 1b2466e1f8
commit 5149723b5c
2 changed files with 14 additions and 10 deletions

View File

@ -8,3 +8,6 @@ It'll do this as simply as it can: no albums, no ads, just lofi.
I really hate modern music platforms, and I wanted a small, "suckless" I really hate modern music platforms, and I wanted a small, "suckless"
app that would literally just play lofi without video so I could use it app that would literally just play lofi without video so I could use it
whenever. whenever.
I also wanted it to be fairly resiliant to inconsistent networks,
so it buffers 5 whole songs at a time instead of parts of the same song.

View File

@ -10,7 +10,7 @@ mod tracks;
#[command(about)] #[command(about)]
struct Args { struct Args {
#[command(subcommand)] #[command(subcommand)]
command: Commands, command: Option<Commands>,
} }
#[derive(Subcommand)] #[derive(Subcommand)]
@ -24,20 +24,21 @@ enum Commands {
/// Whether to include the full HTTP URL or just the distinguishing part. /// Whether to include the full HTTP URL or just the distinguishing part.
#[clap(long, short)] #[clap(long, short)]
include_full: bool, include_full: bool,
}, }
/// Starts the player.
Play,
} }
#[tokio::main] #[tokio::main]
async fn main() -> eyre::Result<()> { async fn main() -> eyre::Result<()> {
let cli = Args::parse(); let cli = Args::parse();
match cli.command { if let Some(command) = cli.command {
match command {
Commands::Scrape { Commands::Scrape {
extention, extention,
include_full, include_full,
} => scrape::scrape(extention, include_full).await, } => scrape::scrape(extention, include_full).await
Commands::Play => play::play().await, }
} else {
play::play().await
} }
} }