Commit Graph

40 Commits

Author SHA1 Message Date
Antoine POPINEAU b87766dad2
#66: Fixed behavior on queue shuffling, clearing and end of queue on no-repeat. 2020-09-02 12:05:31 +02:00
Antoine POPINEAU 50c8dac297
#66: add queue actions to clear or shuffle the queue. 2020-09-01 22:16:36 +02:00
Antoine POPINEAU d76f76a222
Use the new schema for cover art URLs. 2020-08-08 14:51:39 +02:00
Antoine POPINEAU 5c684b6e67
Fixed audio focus stealing. 2020-07-12 20:46:33 +02:00
Antoine POPINEAU b0640cf1b2
Streamline the way the media session is controled across devices. 2020-07-12 18:28:50 +02:00
Antoine POPINEAU ba31a4efcf
Some tracks do not have album, this fixes a crash trying to retrieve their album cover. Changed the placeholder album cover to be less aggressive to the eye. 2020-07-11 21:01:09 +02:00
Antoine POPINEAU dd86988518
Explicitely remove notification when paused and the app is swiped up. 2020-07-11 14:16:22 +02:00
Antoine POPINEAU b6b9e4c053
Reattach the detached service notification when the app is swiped (if not playing) for it be removed with the application. 2020-07-11 12:58:25 +02:00
Antoine POPINEAU fe224b097a
Re-enabled media session on service start. Do not condition radio resumption to having a cookie, since those are only valid when authenticated anonymously. 2020-07-10 18:46:49 +02:00
Antoine POPINEAU b34810d631
Allow media session resuming from media buttons when service is killed. 2020-07-10 17:18:29 +02:00
Antoine POPINEAU 4ecb607f45
Let the media session live when playback is paused.
As per Android policy and internal logic, we stopped the playback
foreground service when playback was paused. This made our PlayService
elligible for garbage collection by the OS. This had the consequences of
not allowing someone to pause playback and resume it after some time.
Android would always kill the service after around one minute.

This commit, on supported Android version (7.0+) detaches the
notification when stopping the foreground service, leaving the
notification in place even when the service is killed, allowing the user
to resume playback whenever they please.

We also had to move the MediaSession out of the service, for it to
remain alive between service killing and resurrection.
2020-07-09 23:01:35 +02:00
Antoine POPINEAU b0d7ff393d
Changed track metadata reporting method so it could work similarly across devices (notification, ambient display, lockscreen, watches, ...) (#55). 2020-07-08 12:46:52 +02:00
Antoine POPINEAU 9b888ba17f
Do not skip track on error if the user paused playback. Fixed an issue where two track could be marked as playing at the same time in TracksFragment. 2020-06-26 19:05:11 +02:00
Antoine POPINEAU 9c61fcf462
Tidied up usage of GlobalScope to the profit of AndroidX's lifecycle coroutine scopes. 2020-06-25 01:26:15 +02:00
Antoine POPINEAU f7a5a29eea
Pulled some fixes from dev/chromecast (080cce00ee). 2020-06-24 19:45:16 +02:00
Antoine POPINEAU b2d26a8127
Refactored and rationalized some events and commands on the buses. 2020-06-24 14:54:13 +02:00
Antoine POPINEAU 490de25b05
Handle radios when logged in anonymously.
On top this fix, this commit adds support for "My content" and
"Favorites" instance radios (fixes #51), as well as clearly separates instance
radios from user radios.

Radios were a bit unusable when not logged in with an actual authorized
user account, this commit fixes the following elements:

 * Anonymous users get a transient session cookie when starting a radio
   session that was not stored and forwarded on playback, meaning no
   radios would play;
 * Anonymous users do not have their own own content. Thus, only the
   "Random" radio makes sense in that context. This commit only display
   the instance radios that are relevant to your authentication status.

"My content" radios needs the user ID to function properly, this commit
also adds retrieving it from the /api/v1/users/users/me/ endpoint, which
now may be used in the future for other purposes.
2020-06-21 13:41:27 +02:00
Antoine POPINEAU 18e981fba5
Fixed an issue where the main playback UI would freeze when skipping an erroring track (in airplane mode, for example). 2020-06-20 22:10:13 +02:00
Antoine POPINEAU 66c7915307
Prevent issue on queue item deletion. Should close #48. 2020-06-20 16:32:14 +02:00
Antoine POPINEAU a2c35595c7
Better handling of download progress and event. Added an option to retry failed downloads. Performance improvement around downloads UI. 2020-06-14 20:32:48 +02:00
Antoine POPINEAU a2caba8bd1
Added downloaded indicator on track rows. 2020-06-14 20:32:17 +02:00
Antoine POPINEAU 4127421132
Allow downloading whole albums. 2020-06-14 20:31:12 +02:00
Antoine POPINEAU 00fb833cfa
Added basic management of downloads and downloaded tracks. 2020-06-14 20:31:07 +02:00
Antoine POPINEAU 2dfabf74e9
Initial handling of track downloads. 2020-06-14 20:28:05 +02:00
Antoine POPINEAU 17dace030e
Upgraded ExoPlayer, manually compiled FLAC extension. Related to #44. 2020-06-13 22:24:35 +02:00
Antoine POPINEAU 54f911793a
Fixed skipping tracks on playback error. The faulty track is now removed from the queue. 2020-06-10 11:38:57 +02:00
Antoine POPINEAU cb43615cb1
Fixed some linting issues. Fixed two issues related to current track emphasis and landscape now playing cover background. 2020-06-01 21:25:16 +02:00
Antoine POPINEAU ce05acad21
Send track played reports to Funkwhale whenever a track finishes playing. Closes #40. 2020-06-01 16:31:58 +02:00
Antoine POPINEAU fd1741ca53
Added experimental radios support. Fixed linter and fastlane metadata. 2020-05-30 21:16:28 +02:00
Antoine POPINEAU 3fb0bb55a4
Seek to start of song when nexting (progress cache would remain at the progress of the previous track. 2020-05-30 17:49:08 +02:00
Antoine POPINEAU cf4cd16bed
Added a toggle for repeat mode on the Now Playing view. Should fix #26. 2020-05-29 23:42:03 +02:00
Antoine POPINEAU 55ab0ce71c
Cache playback position on pause. Should fix #19. 2020-05-29 10:32:09 +02:00
Antoine POPINEAU a21cafdbe0
Fix miscellaneous bugs to Flow implementation. 2019-11-16 16:52:42 +01:00
Antoine POPINEAU ba12854e6c
Migrate to Flows. 2019-11-16 16:52:39 +01:00
Antoine POPINEAU eac875b9cb
Clear queue on logout. 2019-10-30 22:06:57 +01:00
Antoine POPINEAU 7c9a71d6d7
Put buggy features behind an experiments gate (favorites, for now). Optimized layouts to be able to load lots of content. Fixed Funkwhale API URLs to try and be backward compatible. 2019-10-29 23:41:44 +01:00
Antoine POPINEAU 0fa0b5d212
Added support for Flac. 2019-10-23 21:41:50 +02:00
Antoine POPINEAU 9e7d1cfe29
Added missing ripple effects. Fixed padding around list items. Moved event buses into Application object. 2019-10-22 20:03:52 +02:00
Antoine POPINEAU 31063fb40f
Misc refactoring. 2019-10-21 11:51:32 +02:00
Antoine POPINEAU 5f495f54e5
Initial commit. 2019-10-20 15:19:18 +02:00