dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
882 stars 45 forks source link

Add Loop functionality to player controls #197

Closed adamantike closed 1 year ago

adamantike commented 1 year ago

Adding the Loop functionality, along with the Player changes to support it, and a button to the player controls.

Player now has a loopMode attribute, which determines whether it should loop. At the moment, only the following modes are supported:

This has been designed as an enum, to support other modes in the future (e.g. loop for the current track only).

It depends on the loop functionality provided by MPV (using the loop-playlist option), so no custom logic is needed to reset the currently playing index.

adamantike commented 1 year ago

Thanks for tyding it up!

What do you think about adding icons similar to the following ones, which resemble what other apps use for this functionality?

If you add them, I can use the one for the Repeat one, to implement that functionality.

dweymouth commented 1 year ago

Sounds good - I'll look for some SVG repeat icons with a compatible license and bundle them and let you know! I'm planning on releasing 0.4.0 soon, maybe later this week, once this plus the download completed notification @natilou was going to add, and the custom theme work I've been doing, are ready. I was planning on getting Jellyfin support into 0.4.0 initially, but that'll end up getting pushed back