Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to seek from the CLI #692

Merged
merged 8 commits into from
Jan 8, 2021
Merged

Add ability to seek from the CLI #692

merged 8 commits into from
Jan 8, 2021

Conversation

OrangeFran
Copy link
Contributor

@OrangeFran OrangeFran commented Jan 3, 2021

  • Add new --seek to jump forward, backwards
  • Add new %r to the format options to display the current progress
  • Add a longer help to the --seek option

For example: spt pb --seek +10 jumps ten second forwards, spt pb --seek -10 ten seconds backwards and
spt pb --seek 10 to the tenth second of the track.

@Rigellute
Copy link
Owner

I've fixed the clippy errors in #697, so you can rebase to remove those.

I'll get to reviewing your changes as soon as I can.

To jump forward, prepend a + to the number of seconds.
To jump backwards, prepend a -.
To jump to an absolute position, do not prepend anything.
…duration is bigger than the duration of the song
@Rigellute
Copy link
Owner

LGTM 👍

@Rigellute Rigellute merged commit 6d7ab43 into Rigellute:master Jan 8, 2021
lanej pushed a commit to lanej/spotify-tui that referenced this pull request Jul 13, 2021
* Add new `--seek` to jump forward, backwards

To jump forward, prepend a + to the number of seconds.
To jump backwards, prepend a -.
To jump to an absolute position, do not prepend anything.

* Add new `%r` to the format options to display the current progress

Utilised by the `--seek` option.

* Add a longer help to the `--seek` option

* Fix formatting

* Add checks to prevent underflows + check to jump to next song if new duration is bigger than the duration of the song

* Fix formatting

* Fix clippy errors

* Add more comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants