Commit Graph
2146 Commits
Author SHA1 Message Date
Alexander Capehart 05101c0e08 service: implement onGetItem
Should round out the rest of the MediaSession interface I need. Now
just have to hook up to Android Auto.
2024-04-09 22:44:30 -06:00
Alexander Capehart 48275c4698 service: add search functionality
I cannot tell if this actually works yet.
2024-04-09 22:28:32 -06:00
Alexander Capehart e9a4b99aa5 service: dead code removal 2024-04-09 15:35:36 -06:00
Alexander Capehart 62d3c2dfb1 service: unify foreground management 2024-04-09 15:27:56 -06:00
Alexander Capehart 7503accada playback: handle media item playback 2024-04-09 15:17:24 -06:00
Alexander Capehart 64b9557793 playback: always enable skipping 2024-04-08 21:15:15 -06:00
Alexander Capehart 08e00c7fb1 playback: use custom service lifecycle 2024-04-08 21:15:04 -06:00
Alexander Capehart 04ea6834fb playback: rearchitecture around media3 (prototype)
Nowhere near complete in any capacity.
2024-04-07 23:25:53 -06:00
Alexander Capehart da07be26f4 playback: re-add replaygain off mode
It was honestly foolish for me to recommend retagging.

Resolves #746.
2024-04-07 23:25:53 -06:00
Alexander Capehart dc51c84c54 home: handle playback decision event
Forgot to add this.

Resolves #734.
2024-04-07 23:25:53 -06:00
unrenowned b075f8ec51 playback: fix playNext wraparound with Repeat All
ExoPlayer method for fetching next media item respects Repeat All, which
on the last song of a queue causes playNext to wrap around and insert
the songs at the start of the queue. New code fetches next song as if
repeat were turned off, so the songs will always be added to the end of
the queue.
2024-04-07 23:25:53 -06:00
unrenowned e0352a105a playback: fix playNext crash on last song of queue
Fixes OxygenCobalt/Auxio#735. ExoPlayer method for fetching next media
item returns C.INDEX_UNSET (-1) when used on the last song of a queue,
which is not a valid index for ExoPlayer.addMediaItems(). New code just
adds songs to the end of the queue if there isn't a next song.
2024-04-07 23:25:53 -06:00
Alexander Capehart 8221e98401 playback: fix add to queue again 2024-04-07 23:25:53 -06:00
Alexander Capehart f5bc31a00f home: fix crash on music updates 2024-04-07 23:25:53 -06:00
Alexander Capehart 2a0624f860 playback: fix more state restore issues
They just keep coming. I hate how complicated this system is.
2024-04-07 23:25:53 -06:00
Alexander Capehart 6d6b1665e5 all: reformat 2024-04-07 23:25:52 -06:00
Alexander Capehart 3ca9b515cf widget: fix wafer cover setup
Apparently:
1. Some OEMs don't actually autocrop to rounded corners
2. I was not correctly using the right corner radius attributes in the
first place, making it inconsistent.

Let's fix that.

Closes #730
2024-04-07 23:25:52 -06:00
Alexander Capehart dbfe9927bf playback: fix broken state restore
That didn't properly handle when the index was invalid and kept stale
song entries.

Resolves #723.
2024-04-07 23:25:52 -06:00
Alexander Capehart b6f89de88d playback: fix crash w/add to queue
Again, a two-fold problem:
- Was not properly giving the right StateAck to the state holder
- ShuffleOrder not properly handling the index given when adding to
queue internally

Resolves #727.
2024-04-07 23:25:52 -06:00
Alexander Capehart 86b7ef8d5c music: fix crash on playlist add
Caused by the new state restoration code being bugged and applying on
playlist changes, then combined with the playlist code not properly
switching to the main context when dispatching a library update.
2024-04-07 23:25:52 -06:00
Alexander Capehart 22a22a883f service: unify playback and indexer
Playback and indexing now occur in the same service through a new
bridge called AuxioService.

AuxioService contains the existing service instances as Fragment
implementations, and then forwards typical service events to them
(albeit this will drift more and more as I continue to deal with
lifecycle issues).

This should be the first step in enabling true service independence,
as it means that the service will now immediately initialize and load
music as soon as possible.
2024-04-07 23:25:52 -06:00
Alexander Capehart b2a6d40252 playback: cleanup 2024-02-24 14:47:55 -07:00
Alexander Capehart 6a76a55060 music: bump cache db version 2024-02-24 14:38:21 -07:00
Alexander Capehart 3a04bef074 all: reformat 2024-02-24 13:28:49 -07:00
Alexander Capehart 5efdfb6aac home: make sure to avoid touch overlay crash
Only configure the touch overlay when the fragment resumes, and don't
do any weird post stuff.
2024-02-24 13:27:52 -07:00
Alexander Capehart a036005f75 playback: fix broken state restore 2024-02-24 12:37:49 -07:00
Alexander Capehart 07a98029c6 music: fix opus replaygain interpretation
- Don't parse the base gain, the media player actually does apply it.
- Adjust R128 tags to LUFS -18 to be consistent w/MP3.

Resolves #521.
2024-02-20 11:12:24 -07:00
Alexander Capehart f3261ded43 about: add yrliet to supporters 2024-02-17 14:35:04 -07:00
Alexander Capehart 23d561cc44 playback: save when service closes
This time, actually wait for the save to complete before stopping the
foreground state. This requires some checks to make sure that we don't
have any "randomly smashing on buttons" errors, but I'm unsure if that
will be enough.

The last case in which this becomes an issue is when the service
is killed outright. I can't do much here to make the state more sane
unless I did some playback position monitoring.
2024-02-17 14:00:12 -07:00
Alexander Capehart eb3c320523 home: move speed dial touch setup to onStart
If we don't do this, the views won't be there and the app will crash
in some circumstances.

Resolves #701.
2024-02-17 12:13:07 -07:00
Alexander Capehart 6730766504 music: increase music load timeout
TagExtractor can take longer than 10 seconds to load, increase it to 60
seconds.
2024-01-28 21:38:45 -07:00
Alexander Capehart ced462e718 playback: dont apply state mirror w/no song
Otherwise, the StateHolder will crash.
2024-01-28 21:38:45 -07:00
Alexander Capehart 8dc0be4a52 all: cleanup 2024-01-21 20:01:26 -07:00
Alexander Capehart b53a96f574 playback: fix crash when song cannot be restored
The index is -1, which is not a valid position to seek through
normally. In this case we should just ignore it.
2024-01-21 19:33:49 -07:00
Alexander Capehart e6141b12e6 playback: fix state restore
Wasn't using the corrected shuffle mapping
2024-01-16 13:25:03 -07:00
Alexander Capehart ec61ba50ec playback: re-add semi-circular queue w/no repeat 2024-01-16 12:48:32 -07:00
Alexander Capehart 881df0fc02 widgets: add 1x3/1x4 widget
Add a 1x3/1x4 widget that displays the cover and controls

Also requires another widget type that just displays controls to
accomodate landscape devices.

Resolves #420.
2024-01-15 20:49:35 -07:00
Alexander Capehart 3e79f31792 playback: add remember pause setting
This setting allows you to remain playing/paused when you move in the
queue or edit the queue. Useful for some people who like this behavior
more than always playing.

Resolves #568.
2024-01-15 16:45:44 -07:00
Alexander Capehart a44f0bce35 playback: stop playback on task removal if paused
This is apparently the standard behavior that media apps should use to
allow the foreground state to be exited. I personally don't want to
make it really unilateral like that, so if playback is already ongoing
I'll keep the foreground state going.
2024-01-15 16:25:42 -07:00
Alexander Capehart 1766283cd2 playback: save playback state on every change
Prior, I was saving when the service was closed, which is a stupid
decision and caused a lot of unreliability.

Resolves #404.
2024-01-15 16:19:27 -07:00
Alexander Capehart b2d9b244e5 playback: redocument/refactor gapless playback
Should complete this feature, save regression fixes.

Resolves #110.
2024-01-15 16:02:47 -07:00
Alexander Capehart 48ab83f6de playback: handle deferred action on startup
Dropped this when I ripped out the code prior.
2024-01-15 16:01:53 -07:00
Alexander Capehart 68443dc337 Merge branch 'dev' into gapless-playback 2024-01-14 12:12:49 -07:00
Alexander Capehart 07acb4f5b9 music: fix data selector creation
More or less, the paths being selected for were extremely malformed,
stuff like storage/emulated/0Music. This completely broke music folders
below API 29.
2024-01-14 11:00:52 -07:00
Alexander Capehart f1a6b77d30 music: fix other music loading failure from dirs
Turns out there are two ways the selector can go malformed. One was the
complicated issue where you can't resolve a directory, the other was me
*missing a character* and not even building the selector right.
2024-01-14 09:55:43 -07:00
Alexander Capehart 4234f5b8f1 music: update cache db 2024-01-13 22:23:42 -07:00
Alexander Capehart b4833918cf music: fix opus base gain extraction
I have no idea how it ended up this mangled.
2024-01-13 22:16:13 -07:00
Alexander Capehart 3267ae98be playback: readd service reinit
Make sure the service is properly re-initialized when it dies and is
then restarted.
2024-01-13 20:43:51 -07:00
Alexander Capehart f525abdba3 playback: fix marquee on playback screen 2024-01-13 20:28:34 -07:00
Alexander Capehart b2d71f8903 playback: reattach settings to player
It's mostly identical to prior, albiet pausing on repeat now leaves the
player position at the end of the song rather than the beginning.
That's the only regression I couldn't figure out how to resolve.
2024-01-13 20:26:02 -07:00