Nokse22 / high-tide

Native TIDAL client for Linux
GNU General Public License v3.0
36 stars 6 forks source link

Queue always repeats #11

Open Drakulix opened 2 weeks ago

Drakulix commented 2 weeks ago

Playing an album through will cause it to start again without an option to disable that behaviour.

Maybe this could be configurable in settings? Happy to tackle this, if given some pointers. :)

(Thanks for working on this!)

Nokse22 commented 2 weeks ago

Hello! Thank you. It should be the button opposite to the shuffle in the controls, but I've never implemented it. It should function as a repeat song/album/once with different icons that represents each state.

All the player logic is handled in src/lib/player_object.py, so here you would need to add the repeat logic. In src/window.py you would need to add a handler for when repeat_button is clicked and change the state in the player_object and the icon accordingly, now the repeat_button is a toggle button, but it would need to be a normal button.

For the logic you would need to handle it in the play_next function in player_object.py. If the state is repeat once it should stop at the end of the album, if it is repeat song it will start the song over, if it's repeat album it is the current behavior.

It would be also good to save the preferred state between restarts.

Let me know if you need help. If you end up not doing it is fine.