Break up the monster AuxioService into sub-classes, keeping just the
major lifecycle and music stuff in AuxioService for now (which will
likely be split out itself eventually)
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.
FixesOxygenCobalt/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.
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
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.
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.
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.
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.
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.
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.
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.
More or less, the paths being selected for were extremely malformed,
stuff like storage/emulated/0Music. This completely broke music folders
below API 29.
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.
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.
Mirror the last playback state of the holder inside
PlaybackStateManager.
This is generally more efficient and will enable better handling of
when state holders attach and detach.
Add a currently-unused ShuffleOrder implementation with fixes for media
item insertion.
This will be used as the basis of the new gapless playback system,
assuming all else goes well.
OPUS has another volume adjustment field on top of the existing R128
adjustments. I was under the impression this was handled by the android
system, but apparently not. This commit applies the base gain to files
by just adding them onto the existing ReplayGain values.
Resolves#521.
Handle back presses gracefully without finicky behavior when doing back
gestures.
I've spent far too much time trying to make this sensible. I'm going to
take a break.
The stock overlay is not sufficient for our needs, as:
1. It seemingly cannot be set up without missing certain touch areas or
disabling the touch area of the speed dial itself
2. The scrim can't be evenly applied everywhere in the app due to the
nested expore UI.
So, modify the speed dial to work without a scrim and reimplement the
overlay touch behavior manually.
When reimporting an M3U file into a playlist, if the name differs, then
initiate a rename dialog so the user has a choice on whether they want
to use the new name or not.
This does kinda desecrate the "Rename" decision a bit, but it's still
to the user the same.
When you import a playlist, Auxio will now always display the
"New Playlist" dialog so you can change whatever name Auxio has picked
for the imported playlist.
This also prevents the creation of two playlists with the same names.
- Make the interpreters use a more conventional naming structure
- Remove the redundant file name extraction that is largely an artifact
of older versions
Split the version-specific components into "Interpreters" that are then
composed into MediaStoreExtractor. This is both a nicer design and also
allows me to resolve an evil Huawei bug that prevents me from using the
new path fields.
Resolves#592
The context of the "New Playlist" dialog can differ depending on the
action performed, such as adding to a playlist or importing a playlist.
We need to make sure we're still showing the right message once this
is done.
Add more types of playlist messages corresponding to other actions, so
they can be indicated in the UI only when the process is complete.
This is somewhat incomplete. It does not include indicating errors for
other playlist operations (Which I want to do), and neither does it
handle situations in which some playlist operations and up reducing
to others (i.e import -> create). I need to do that later.
Add a menu option that allows you to import a playlist file into an
existing playlist.
This is useful for keeping Auxio playlists up to date with a remote
source.