mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 16:15:55 +03:00
[GH-ISSUE #214] Add reset track control #106
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @amgassert on GitHub (Jan 18, 2020).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/214
It would be nice if there were a way to reset the track (seek to 0:00). Going to the previous track (p) then next track (n) to reset the song isn't ideal because it requires an extra keypress, and the previous song immediately starts playing.
@sputnick1124 commented on GitHub (Jan 22, 2020):
This is already the behavior of pressing
button in Spotify's native GUI application.
p.ponly backs up to the previous track when playback is at the beginning of the current track. Essentially,rspotifysimply sends a request to the "/player/previous" endpoint (see here), which should correspond to clicking the "Previous"@amgassert commented on GitHub (Jan 23, 2020):
This is not true.
If you take a look at the documentation for that endpoint (see here), you'll find the following line:
@sputnick1124 commented on GitHub (Jan 23, 2020):
Ah! you're right. Seems I was still looking at the beta API documentation still where that is not called out.
That said, I have not noticed that this behavior has actually come about yet, but I agree that this should be addressed and your PR looks good to me.
@amgassert commented on GitHub (Jan 23, 2020):
Which version are you using? I'm experiencing this behavior with v0.11.0.
We might also consider changing the behavior of the
pbutton to use the seek endpoint, as the official client does with its previous button. I think some people may prefer this to the changes I've proposed in #215.@sputnick1124 commented on GitHub (Jan 23, 2020):
I am also on 0.11.0. Besides, this would be agnostic to the version of
sptsince this on Spotify's end, no?Also, +1 to your point of handling this within
sptwith only thepbinding. Having an additional keybinding would be an unexpected necessity.As for Spotify's API documentation, it is very confusing which to believe. The endpoint you have referenced is marked beta and there is a link at the top of that page which takes you to the docs I referenced, which are also beta. At any rate, even when I click the "TRY IT" button on the endpoint's doc page, it still only resets playback.
@sputnick1124 commented on GitHub (Jan 23, 2020):
Ah, just figured it out right after posting. I am using
spotifydas my Spotify Connect device, which has shown some abnormalities in other cases. This must be another one of those cases.When I play spotify through the native app, the endpoint behaves as documented.
@amgassert commented on GitHub (Jan 23, 2020):
I assumed previous versions of
sptmight use a different version ofrspotify, which may use the endpoints a bit differently, but it looks like the last several versions all use v0.7.0 ofrspotify. Also, if this were entirely on Spotify's end, wouldn't we be experiencing the same behavior?I'll get started on this tonight then.
@sputnick1124 commented on GitHub (Jan 23, 2020):
I would have thought so, but this is obviously not the case. It does make some sense that the difference would not lie in the
sptclient but rather thespotifydserver, though. The root of the discrepancy lies withinlibrespot(which is whatspotifydis based around). That is the library which implements the Spotify Connect protocol and allows the service to show up as a Connect device. Since this has been reverse engineered, there are bound to be some implementation errata.