feat: Add Song radio option in tracklist.

At this moment this feature is only available on the Subsonic media provider. Using a
Jellyfin server the "Play song radio" option will be disabled.
This commit is contained in:
natilou
2024-03-30 12:26:42 -03:00
parent b7e7e959ff
commit 298f4f6602
13 changed files with 88 additions and 1 deletions
+2
View File
@@ -88,11 +88,13 @@ func newPlaylistPage(
}
_, canRate := a.sm.Server.(mediaprovider.SupportsRating)
_, canShare := a.sm.Server.(mediaprovider.SupportsSharing)
_, canSongRadio := a.sm.Server.(mediaprovider.SupportsSongRadio)
remove := fyne.NewMenuItem("Remove from playlist", a.onRemoveSelectedFromPlaylist)
remove.Icon = theme.ContentClearIcon()
a.tracklist.Options = widgets.TracklistOptions{
DisableRating: !canRate,
DisableSharing: !canShare,
DisableSongRadio: !canSongRadio,
AuxiliaryMenuItems: []*fyne.MenuItem{
util.NewReorderTracksSubmenu(a.doSetNewTrackOrder),
remove,