Commit Graph
279 Commits
Author SHA1 Message Date
Drew Weymouth 36555fe64f remove now-unneeded time import 2024-04-14 10:11:23 -07:00
Drew Weymouth 4aa90187fe just use rand.Shuffle 2024-04-14 10:08:14 -07:00
Michael Manganiello 14bfaac7a2 feat: Add sorting options for Artists
Include both `Album Count` and `Random` sortings for the Artists page.

This change also fixes the Artist search feature in Jellyfin, which was
broken because of an open issue on Jellyfin [1]. The current workaround
is to do the filtering locally after receiving all results from Jellyfin
API.

Also, as the Jellyfin API doesn't include a sorting option for
`AlbumCount`, we need to disable pagination when that option is
selected, to receive all artists, and run the sorting locally.

[1] Related issue: https://github.com/jellyfin/jellyfin/issues/8222
2024-04-13 21:04:51 -03:00
Michael Manganiello 1e05d88a8d misc: Move Jellyfin Artist iterator to separate file 2024-04-13 20:17:38 -03:00
Drew Weymouth 975f64d730 increase sleep before seeking when restoring play queue 2024-04-13 11:41:52 -07:00
Tanguy Rossel 63bdfb5f87 WIP: feat: add "Play next" MenuItem 2024-04-04 08:39:14 +02:00
Drew Weymouth 914636e91f remove SupportsSongRadio infra since all mediaproviders support it now 2024-03-31 09:28:50 -07:00
Drew Weymouth d5f0971aa2 Closes #351: show reissue year in album page header 2024-03-31 08:26:54 -07:00
Drew Weymouth 0c03ac87a1 Merge pull request #355 from adamantike/misc/migrate-artists-page-to-gridview
misc: Migrate Artists page to GridView
2024-03-31 08:06:07 -07:00
Michael Manganiello 66658b1401 misc: Migrate Artists page to GridView
Remove custom page implementation for Artists, and instead rely on the
generic `GridView` approach. This also simplifies adding new
sorting/filtering options as next improvements.

The new `ArtistFilter` is a dummy implementation without any real
filters at the moment.

Also, the `go-jellyfin` upgrade is needed to correctly display the album
count for each artist.
2024-03-30 12:42:48 -03:00
natilou 0bd0ea8919 adding get son radio support to Jellyfin server 2024-03-30 12:31:14 -03:00
natilou 298f4f6602 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.
2024-03-30 12:26:42 -03:00
natilou 934302131e chore: upgrade go-jellyfin library 2024-03-29 14:05:59 -03:00
Michael Manganiello b8cd79e6de fix: Add cloning logic to filters, make providers not update original filter 2024-03-17 00:56:49 -03:00
Michael Manganiello a220243279 misc: Decouple Grid view from Albums
The Grid view and related components were highly coupled to Albums,
including the filter button that is currently used only for album
filtering.

As part of the migration of Artists to Grid view, this is the smallest
possible change to convert many of the existing code to
generics/interfaces that will allow different media to be displayed and
filtered by using Grid views.

The main changes in this diff are:

* Introduction of generics for Media types (`M`) and Filter options
  (`F`), which can be later extended to other entities besides Albums.
* Complete decoupling of `GridViewPage` and related components from
  Albums (making these pages also generic).
* Refactoring of Subsonic/Jellyfin specific code to understand these new
  generics when dealing with filtering logic.
2024-03-11 00:44:20 -03:00
Drew Weymouth 739b5eb64d save last active tab in Now Playing page 2024-03-06 19:48:55 -08:00
Drew Weymouth 1e377619b5 Merge branch 'main' into feature/lyrics 2024-03-06 09:46:44 -08:00
Michael Manganiello d917efe801 fix: Handle sorting for accented strings 2024-03-06 00:55:46 -03:00
Michael Manganiello 2cb002dde0 misc: Implement Iterator approach for artists
First step towards improving sorting for Artists. Use the same iterator
approach as albums and tracks.
2024-03-06 00:54:16 -03:00
Drew Weymouth ea1d78ed58 add LyricsProvider / GetLyrics 2024-03-05 08:53:57 -08:00
Michael Manganiello 801967a530 misc: Upgrade Go to v1.21
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.
2024-03-05 09:49:10 -03:00
Michael Manganiello a6fefc992d Refactor and temporarily disable sharing artists 2024-03-03 21:01:48 -03:00
Michael Manganiello 9d3725cb51 feat: Add Share option for artists, albums, and tracks
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.
2024-03-03 20:44:58 -03:00
Drew Weymouth cd31274a81 remove defunct NowPlayingPageConfig 2024-03-03 14:06:19 -08:00
Drew Weymouth 9b72ff9d17 add OnPlayQueueChange hook 2024-03-03 10:38:12 -08:00
Drew Weymouth 9ed2d8502b add GetFullSizeCoverArtAsync 2024-03-01 16:59:04 -08:00
Drew Weymouth 6a9f488db0 Merge pull request #333 from adamantike/fix/mpris-broken-art-url-on-linux
fix: MPRIS broken cover art on Linux
2024-02-24 11:05:43 -08:00
Michael Manganiello c7dfc9efb3 fix: Enable Loop mode sync for MPRIS
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.
2024-02-24 15:17:13 -03:00
Michael Manganiello 21751221fc fix: MPRIS broken cover art on Linux
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.
2024-02-24 15:04:03 -03:00
Michael Manganiello 56c78aad0c fix: MPRIS Seek functionality on Linux
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.
2024-02-24 13:26:04 -03:00
Drew Weymouth b61afb1ba5 Fix #319: show cancelable modal dialog while connecting to server on startup 2024-02-15 09:04:14 -08:00
Drew Weymouth 91aa92706d Fix #316: Add setting to show notification on track change 2024-01-20 14:42:22 -08:00
Drew Weymouth edc3ef7bfa Fix #315: Pre-select most recent playlist in "Add to playlist" dialog 2024-01-20 14:22:30 -08:00
Drew Weymouth e1bc745645 refactor: split a lower-level playbackEngine out of PlaybackManager 2024-01-13 11:53:18 -08:00
Drew Weymouth ee275cb9ed update Fyne fork to 2.4.3 baseline 2024-01-12 08:53:21 -08:00
Drew Weymouth e9d462e655 move player package into backend 2024-01-08 18:53:13 -08:00
Drew Weymouth 7cfd176c59 extract deepCopy helper function 2024-01-08 17:17:12 -08:00
Drew Weymouth fca5abca94 ignore/skip failure to restore individual tracks from queue 2024-01-08 08:14:45 -08:00
Drew Weymouth 793b570999 load saved play position on startup 2024-01-07 17:14:57 -08:00
Drew Weymouth c4c4a71d5e save and load play queue on exit/startup (partial impl) 2024-01-07 16:25:15 -08:00
Drew Weymouth 9c2f72d9f2 Fix #33: allow reordering of play queue 2024-01-06 14:22:18 -08:00
Drew Weymouth ca25756db7 fix regression- crashing on Repeat One when nothing playing 2024-01-06 11:11:34 -08:00
Drew Weymouth 10feaad1f3 Merge pull request #305 from dweymouth/feature/jukebox
Redesign of PlaybackManager
2023-12-23 10:52:55 -08:00
Drew Weymouth 91951ebfd2 implement new logic for RemoveTracksFromQueue 2023-12-22 17:58:36 -08:00
Drew Weymouth cfb8739a61 when changing loop mode, only call player.SetNext if needed 2023-12-22 17:22:40 -08:00
Drew Weymouth d089151f85 remove extra replaygain set 2023-12-22 16:28:34 -08:00
Drew Weymouth cf41795659 handle LoopMode logic, plus some reorganization 2023-12-22 16:21:29 -08:00
Drew Weymouth de6ba5c120 move LoopMode 2023-12-22 16:01:56 -08:00
Drew Weymouth d9eca8d807 Beginning of reworked PlaybackManager - PARTIAL 2023-12-22 15:50:39 -08:00
Drew Weymouth 4c3d638aed some simplification of PlaybackManager 2023-12-21 20:18:53 -08:00