InputUsername/rescrobbled

doesn't handle multiple running players well

Closed this issue · 5 comments

I often have both cmus and ncspot running, but obviously only one is playing, and rescrobbled doesn't scrobble when one of the players is stopped

You're right. Currently the program retrieves the active player using PlayerFinder::find_active, but apparently this naively selects the first music player in the list of music players, even if another player is active.

Spotify only becomes inactive once the application is closed, what about cmus/ncspot?

I suggest using PlayerFinder::find_all() and scrobble from the one that is currently playing

I've implemented simple handling for multiple players on the multiple-player-support branch. Could you check if this works for your use case?

As soon as a player is paused or stopped, the program will start looking for another player.

seems to be working fine

Cool, thanks. Merged.