Commit Graph

49 Commits

Author SHA1 Message Date
Antoine POPINEAU a7b469d690
#15: added "Add to playlist" action from the Now Playing screen. 2020-09-26 18:34:13 +02:00
Antoine POPINEAU 6bdefa1936
#81: added save current queue to playlist. 2020-09-26 18:23:12 +02:00
Antoine POPINEAU d796fca26b
#15: Enabled "Add to playlist" in the search screen. Localized strings and improved UI. 2020-09-06 14:56:43 +02:00
Antoine POPINEAU 54d4dc2235
#15: initial support for adding tracks to a playlist. 2020-09-06 14:56:43 +02:00
Antoine POPINEAU e60814d28f
#52: Properly handle content filter selection and state. 2020-09-03 22:55:10 +02:00
Antoine POPINEAU ce8d956cee
#52: implemented UI and functionnal filtering for all, me and subscribed. Funkwhale still does not seem to respect that. 2020-09-03 22:55:09 +02:00
Antoine POPINEAU 998dab0fb5
Do not delete downloads on authentication error (prepare for new authentication system). 2020-08-29 15:14:59 +02:00
Antoine POPINEAU d76f76a222
Use the new schema for cover art URLs. 2020-08-08 14:51:39 +02:00
Antoine POPINEAU 85e9f14e2a
Cleaned up DisableableFrameLayout. 2020-07-12 19:05:51 +02:00
Antoine POPINEAU 1e62cc1f4e
Now Playing view: do not cancel fling event on touch, disable view behind it when opened. 2020-07-12 18:55:52 +02:00
Antoine POPINEAU 931cd0b42d
Stop PlayerService when logging out. 2020-07-11 21:05:19 +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 61fdb116ad
Fixed an issue where favorited tracks would not show up erroneously in track lists. 2020-07-11 16:56:09 +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 b14b703f05
Fix an issue where always retrieving favorites from the network could be really costly and introduce stack overflows (#60). 2020-07-10 15:50:56 +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 b2e6ec43a8
Improved loading of new and cached items.
Scrolling through large lists was a pain. The next page would only load
when the end of the list was reached, stopping the scroll action while the new
page was fetched.

This commits adds two items:

 * Artists, albums and playlists do not refresh data on resume, only
   using cached data until manually refreshed.
 * When manually refreshed, we initially fetch a few pages instead
   of only one. Also, on scroll, we try as best as we can to always keep
   10 pages (pages as in screen estate) worth of data loaded.
2020-07-08 22:11:50 +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 b2d26a8127
Refactored and rationalized some events and commands on the buses. 2020-06-24 14:54:13 +02:00
Antoine POPINEAU 874b79d0d5
Fixed blocking issue when leaving MainActivity where playback state would no longer be reflected in Now Playing. 2020-06-21 16:15:52 +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 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 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 a0e201e68f
Filter music according to own music setting (should close #33). 2020-06-14 20:26:47 +02:00
Antoine POPINEAU 746ae8897d
Frontend logic for displaying only own music. 2020-06-14 20:26:39 +02:00
Antoine POPINEAU fc1419c2fb
Minor style enhancement. 2020-06-14 00:42:45 +02:00
Antoine POPINEAU d76f820f9d
Left test exception throw... 2020-06-11 00:02:49 +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 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 ae903aba65
Fix repeat icon color in dark mode. 2020-05-31 02:38:59 +02:00
Antoine POPINEAU 159685bcc1
Added track details from Now Playing view. Should fix #30. 2020-05-30 15:49:06 +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 b554678500
Added links to artist and album on Now Playing view. Partially covers #30. 2020-05-29 21:40:01 +02:00
Antoine POPINEAU 55ab0ce71c
Cache playback position on pause. Should fix #19. 2020-05-29 10:32:09 +02:00
Antoine POPINEAU b7db24ea11
Fixed issue with merging around favorite management. 2019-11-22 20:14:05 +01:00
Antoine POPINEAU 0cb4bda212
Added support for landscape mode. 2019-11-21 23:26:34 +01:00
Antoine POPINEAU ba12854e6c
Migrate to Flows. 2019-11-16 16:52:39 +01:00
Antoine POPINEAU 22c99d384c
Fixed issue #7 to display all search results properly. 2019-10-31 11:20:12 +01: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 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 a63f3f7e68
Added ability to not fetch on create for fragments. Added animation on queue change. 2019-10-24 12:35:34 +02:00
Antoine POPINEAU e84455390b
Several improvements in UI (better colors for night mode, added icons).
Better handling of startup (login activity would reset if put in the background).
Allow use of schemeless hostname for login.
Destroy main activity and clear cache on logout.
Change of endpoint for favorites retrieval for one with much better performance.
2019-10-23 20:21:18 +02:00
Antoine POPINEAU 78468167ca
Fixed crash on coverless albums. 2019-10-22 21:56:33 +02:00
Antoine POPINEAU 0b14415e1e
Linting. 2019-10-21 19:49:48 +02:00
Antoine POPINEAU 5f495f54e5
Initial commit. 2019-10-20 15:19:18 +02:00