spotify_cli/cli/args/
library.rs

1//! Library command definitions.
2
3use clap::Subcommand;
4
5use crate::constants::{DEFAULT_LIMIT, DEFAULT_OFFSET};
6
7#[derive(Subcommand)]
8pub enum LibraryCommand {
9    /// List saved tracks (liked songs) (alias: ls)
10    #[command(alias = "ls")]
11    List {
12        /// Number of tracks to return (default 20, max 50)
13        #[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
14        limit: u8,
15        /// Offset for pagination
16        #[arg(long, short = 'o', default_value_t = DEFAULT_OFFSET)]
17        offset: u32,
18    },
19    /// Save tracks to library (like songs)
20    Save {
21        /// Track IDs to save
22        ids: Vec<String>,
23        /// Save the currently playing track
24        #[arg(long, short = 'n')]
25        now_playing: bool,
26        /// Show what would be done without making changes
27        #[arg(long)]
28        dry_run: bool,
29    },
30    /// Remove tracks from library (unlike songs)
31    Remove {
32        /// Track IDs to remove
33        #[arg(required = true)]
34        ids: Vec<String>,
35        /// Show what would be done without making changes
36        #[arg(long)]
37        dry_run: bool,
38    },
39    /// Check if tracks are in library
40    Check {
41        /// Track IDs to check
42        #[arg(required = true)]
43        ids: Vec<String>,
44    },
45}