Enum Commands

Source
pub enum Commands {
    Edit {
        artist: String,
        track: Option<String>,
        album: Option<String>,
        album_artist: Option<String>,
        new_track: Option<String>,
        new_album: Option<String>,
        new_artist: Option<String>,
        new_album_artist: Option<String>,
        timestamp: Option<u64>,
        edit_all: bool,
        apply: bool,
        dry_run: bool,
    },
    Delete {
        recent_pages: Option<String>,
        timestamp_range: Option<String>,
        recent_offset: Option<String>,
        apply: bool,
        dry_run: bool,
    },
    Show {
        offsets: Vec<u64>,
    },
}

Variants§

§

Edit

Edit scrobble metadata

This command allows you to edit scrobble metadata by specifying what to search for and what to change it to. You can specify any combination of fields to search for, and any combination of new values to change them to.

Usage examples:

§Discover variations for an artist (dry run by default)

lastfm-edit edit –artist “Jimi Hendrix”

§Discover variations with optional track name

lastfm-edit edit –artist “Radiohead” –track “Creep”

§Actually apply edits (change artist name)

lastfm-edit edit –artist “The Beatles” –new-artist “Beatles, The” –apply

§Change track name for specific track

lastfm-edit edit –artist “Jimi Hendrix” –track “Lover Man” –new-track “Lover Man (Live)” –apply

Fields

§artist: String

Artist name (required)

§track: Option<String>

Track name (optional)

§album: Option<String>

Album name (optional)

§album_artist: Option<String>

Album artist name (optional)

§new_track: Option<String>

New track name (optional)

§new_album: Option<String>

New album name (optional)

§new_artist: Option<String>

New artist name (optional)

§new_album_artist: Option<String>

New album artist name (optional)

§timestamp: Option<u64>

Timestamp for specific scrobble (optional)

§edit_all: bool

Whether to edit all instances (optional, defaults to false)

§apply: bool

Actually apply the edits (default is dry-run mode)

§dry_run: bool

Perform a dry run without actually submitting edits (default behavior)

§

Delete

Delete scrobbles in a range

This command allows you to delete scrobbles from your library. You can specify timestamp ranges, delete recent scrobbles from specific pages, or use offsets from the most recent scrobble.

Usage examples:

§Show recent scrobbles that would be deleted (dry run)

lastfm-edit delete –recent-pages 1-3

§Delete scrobbles from timestamp range

lastfm-edit delete –timestamp-range 1640995200-1641000000 –apply

§Delete scrobbles by offset from most recent (0-indexed)

lastfm-edit delete –recent-offset 0-4 –apply

Fields

§recent_pages: Option<String>

Delete scrobbles from recent pages (format: start-end, 0-indexed)

§timestamp_range: Option<String>

Delete scrobbles from timestamp range (format: start_ts-end_ts)

§recent_offset: Option<String>

Delete scrobbles by offset from most recent (format: start-end, 0-indexed)

§apply: bool

Actually perform the deletions (default is dry-run mode)

§dry_run: bool

Perform a dry run without actually deleting (default behavior)

§

Show

Show scrobble details for specific offsets

This command displays detailed information for scrobbles at the specified offsets from your most recent scrobbles.

Usage examples:

§Show details for the most recent scrobble (offset 0)

lastfm-edit show 0

§Show details for multiple scrobbles (0-indexed)

lastfm-edit show 0 1 2 5 10

Fields

§offsets: Vec<u64>

Offsets of scrobbles to show (0-indexed, 0 = most recent)

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,