Upgrade to 1.21 as 1.20 is now unmaintained.
Most changes are related to the new `slices` package from standard
library, which can replace some existing custom functions.
This feature is only available on the Subsonic media provider. Using a
Jellyfin server will make Supersonic hide the "Share" option.
* Artists: Option available in grid view and in Artist view.
* Albums: Option available in grid view and in Album view.
* Tracks: Option available in tracklist, when a single track is selected.
Loop mode changes were being correctly reflected in Supersonic, when
updated in the toolbar, but not the other way around. We were only
missing an `Options` changes emit when loop mode is changed in
Supersonic.
Problem:
When changing tracks, the toolbar display on Linux sometimes misses the
track cover art, and displays a placeholder instead.
Solution:
Copy same callback as the one used for MacOS, which calls
`GetCoverArtUrl` first, to avoid missing cover arts.
Problem:
The operating system toolbar's component to control Supersonic playback
had its Seek functionality broken on Linux. When playing a song, seeking
for a different position from Supersonic worked as expected, but seeking
from the toolbar did nothing to the current track.
I found that the underlying reason was in `MPRISHandler.SetPosition`, as
the `if m.curTrackPath == trackId` always returned false.
`m.curTrackPath` was the right value, but `trackId` was wrong: On the
first song being played for a tracklist, `trackId` when trying to seek
was set to `/org/mpris/MediaPlayer2/TrackList/NoTrack`. When moving to
the next song, `trackId` then became the Track ID of the previously
played song.
Solution:
Changing the call to `OnTitle()` is enough to fix the issue, as the
MPRIS `Metadata()` generation depends on the value of `m.curTrackPath`.
Because it was being called before changing its value, the received
`trackId` was always off.