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

[Feature Request] Next/Previous Track Action #13

Closed
tobru opened this issue Apr 14, 2020 · 9 comments
Closed

[Feature Request] Next/Previous Track Action #13

tobru opened this issue Apr 14, 2020 · 9 comments

Comments

@tobru
Copy link

tobru commented Apr 14, 2020

When working with playlists it would also be great to have a tag to skip forward to the next track or back to the previous one in the playlist. This "Class" is currently not available and it would be fantastic to have it available.

@domibarton
Copy link
Member

Should be doable… let me peek at the official Mopidy API.

@domibarton
Copy link
Member

YAY… Should be really simple, as it's the same playback controller class as the play / resume one:

https://docs.mopidy.com/en/latest/api/core/#mopidy.core.PlaybackController.next

@tobru
Copy link
Author

tobru commented Apr 14, 2020

I'll give it a try with a PR in the next days 👍

@domibarton
Copy link
Member

No worries, I already have it :)

@domibarton
Copy link
Member

I'll probably refactor the code a bit to keep compliant with DRY

@domibarton
Copy link
Member

domibarton commented Apr 14, 2020

I created a new PR for my new add-next-previous-actions branch. However, I couldn't test the changes yet, because I currently don't have the box at home. I'll give it a try in the next days.

What I can say so far:

  • I merged the action functions and Tag classes into Action classes
  • I created new PreviousTrack and NextTrack actions
  • I assigned those actions to new GPIO pins
  • I move the pins for the buttons (see new README)

Again: I only changed the code on the fly without testing. I'd be surprised if that change already works ^^

domibarton added a commit that referenced this issue Apr 14, 2020
Also refactor the code to get rid of separate action functions & tag
classes. Now there's only action classes.

See also #13
@domibarton
Copy link
Member

@tobru I created a new release.

You can use the tag v2.2.0, the master branch or the new PyPi package.

Can you test if everything works as expected and let me know? :)

@tobru
Copy link
Author

tobru commented Apr 15, 2020

@domibarton I can confirm that it just works ™️ 🎉 I'm even impressed that you could read my mind about the new unregister tag possibility which was a thing I was thinking about.

Thank you very much, I owe you a 🍺 once it's possible again!

@tobru tobru closed this as completed Apr 15, 2020
@domibarton
Copy link
Member

lolz :D after the corona thingy, we'll have some 🍻 ;)

Yeah the "unregister" feature was in my mind for some time. But I'm a lazy person, so it took some time. Glad it worked :)

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

No branches or pull requests

2 participants