Commit Graph

17 Commits

Author SHA1 Message Date
Antoine POPINEAU 945f227ace
Added dependency injection. 2020-09-05 15:13:06 +02:00
Antoine POPINEAU 567a7476f9
WIP - Integrate Room and LiveData. 2020-09-05 15:02:22 +02:00
Antoine POPINEAU 002ebec7ce
Do not delete downloaded tracks on log out.
Downloaded tracks can be quite precious when you have lots of them (as
redownloading all of them can be costly in terms of time and money).
This prevents downloaded tracks from being deleted along with your
session.

This must be included in 0.21, so we can safely implement Funkwhale's
new authentication mechanism in 0.22.
2020-08-08 14:58:50 +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 212b44a22f
Actually disable caching if cache size is set to zero. 2020-06-26 18:50:17 +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 3a88e02ca0
Delete regular data cache on logout. 2020-06-21 18:51:22 +02:00
Antoine POPINEAU bab7040b8f
Delete downloaded tracks on logout. Cache is not deleted for now (until I find a way). 2020-06-21 18:06:38 +02:00
Antoine POPINEAU e539cc26dd
Manage cached and downloaded tracks separately. Downloaded track are not automatically evicted and do not count towards cache storage limit. Contributes to #37. Fixed an issue where the event bus on main would be duplicated. 2020-06-20 15:42:10 +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 2dfabf74e9
Initial handling of track downloads. 2020-06-14 20:28:05 +02:00
Antoine POPINEAU e50a43a812
Lint. 2020-06-11 00:01:39 +02:00
Antoine POPINEAU a4b2907c07
Added Settings item to copy the latest logs in case of crash. 2020-06-10 23:59:09 +02:00
Antoine POPINEAU 657c72480e
Some vendors' battery optimizers killed the background service quite
quickly when the app is in the background and *not* playing music. This
had the effect of breaking all player actions within the app (queue
listing, playback control, etc.).

This "starts" PlayerService every time MainActivity is resumed, which is
a noop if the service is still running, but allows retrieving app
functionality otherwise.
2019-10-31 00:46:35 +01: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 5f495f54e5
Initial commit. 2019-10-20 15:19:18 +02:00