Commit graph

374 commits

Author SHA1 Message Date
Alexander Capehart
26f0fb7aba
detail: add support for disc subtittles
Add support for disc subtitle information

This allows disc groups to become named, which is useful for certain
multi-part albums.

Resolves #331.
2023-01-21 17:23:09 -07:00
Alexander Capehart
82a64b5e17
music: accept zero positions with non-zero totals
Accept positions that are zeroed, but only if there are non-zero total
values as well.

Sometimes zeroed positions are deliberate, but other times they are
placeholders meant to indicate a lack of a position. To resolve this,
Auxio now considers zeroed track/disc numbers in the presence of
non-zero track/disc numbers to be valid.
2023-01-21 16:49:17 -07:00
Alexander Capehart
691eed344e
release: bump to 3.0.2
Bump the app version to 3.0.2 (26).
2023-01-21 16:03:30 -07:00
Alexander Capehart
f2d44b40bf
info: note playback state wipe in 3.0.2
Indicate that the playback state will be wiped in 3.0.2 due to the new
queue system.
2023-01-20 15:37:48 -07:00
Alexander Capehart
900bcd142e
list: disable complex diffing for now
Disable the new instructions-based system for now.

The way I was doing reflection was likely far too unsafe and prone to
bugs. I'll want to do it some other way.
2023-01-20 15:16:04 -07:00
Alexander Capehart
b7726607ff
music: re-add song de-duplication
Re-add song deduplication, which apparently was lost at some point in
3.0.0's development cycle.
2023-01-19 07:39:32 -07:00
Alexander Capehart
0c69a35e80
detail: diff instead of replace when resorting
Completely rework the detail list implementations so that resorting the
song list causes a replace operation instead of a diff operation.

This finally makes the list experience consistent across the app.
2023-01-18 16:47:50 -07:00
Alexander Capehart
2c2b560195
settings: redocument 2023-01-17 15:06:16 -07:00
Alexander Capehart
d38da9b892
list: make list instructions generic
Make list instructions generic in preparation for the detail list
update.

Detail views need their own instructions datatype, so this is meant to
allow that to be implemented without issue.
2023-01-16 17:45:03 -07:00
Alexander Capehart
4a7bc4e511
settings: split up ui
Split up the settings ui into four categories.

This should reduce the visual load on the user as Auxio continues to
accrue possible configuration options.

Resolves #323.
2023-01-16 16:14:51 -07:00
Alexander Capehart
6e02929982
music: reorganize music folders dialog
Reorganize the music folders dialog to be more visually straightforward
than prior, primarily by grouping the folder elements into the same
visual region.

Resolves #318.
2023-01-16 10:18:55 -07:00
Alexander Capehart
df98bb535f
list: rework diffing abstraction
Make all adapters relying on diffing unified into a DiffAdapter
superclass that can then accurately respond to the new
UpdateInstructions data.

UpdateInstructions is still not fully used everywhere, but will be
soon.
2023-01-15 20:31:50 -07:00
Alexander Capehart
176f0cc465
list: add update instructions framework
Add the basic framework that should allow for different types of list
updates in different situations.
2023-01-14 19:55:09 -07:00
Alexander Capehart
dc73f96ba8
list: clear selection before navigating back
When the back button is pressed, clear the current selection before
navigating back.

This is something I was planning to do but then completely forgot about
when implementing multi-select.

Resolves #316.
2023-01-07 08:19:12 -07:00
Alexander Capehart
6fa53ab873
playback: mostly hide playback mode details
Mostly hide the code that handles starting playback based on a given
mode into their respective ViewModels.

Again, makes testing easier.
2023-01-06 20:00:18 -07:00
Alexander Capehart
ac9f50c0a0
settings: do not use sharedpreference listener
Switch back to using settings-specific listeners rather than the
SharedPreference listener.

Again, this is due to the need to decouple android code from settings.
It also allows us to fully obscure the details of what settings we are
actually working with.
2023-01-06 19:20:56 -07:00
Alexander Capehart
a5e78e614f
music: complete non-android date tests
Complete the date tests that don't require a context.
2023-01-05 12:55:15 -07:00
Alexander Capehart
743220d0aa
replaygain: revert back to copy no-op
Turns out using isActive to indicate that the AudioProcessor is a no-op
is too unreliable due to how they are managed internally.

Instead, I really do just have to use a copy. Once again ExoPlayer
picks the most absurd possible design choices for no good reason.

Resolves #293.
2023-01-05 11:15:06 -07:00
Alexander Capehart
3f0a532a2d
music: allow editing past queue items
Allow past and currently playing queue items to be edited, instead of
just future queue items.

This was a somewhat requested feature that was impossible with the
prior queue system. With some fixes, the new queue system can now be
used to do this.

This even works with edge cases like removing the currently playing
song. Albeit, it's likely that more bug fixes and testing will be
needed.

Resolves #223.
2023-01-05 09:31:48 -07:00
Alexander Capehart
d5941aa705
music: fix crash when adding music dirs
Fix a crash that would occur when trying to add music dirs without a
file manager to handle it.

Some users apparently disable the built-in file manager under the
assumption that the same intents will work with other file managers.
They do not, and so we need to handle that case and let the user know.
2023-01-04 08:17:34 -07:00
Alexander Capehart
360dab928c
all: misc cleanup
Miscellanious cleanup in preparation for 3.0.1.
2023-01-03 18:56:06 -07:00
Alexander Capehart
b3b7ed524c
release: bump to 3.0.1
Bump the version to 3.0.1 (25).
2023-01-02 19:05:57 -07:00
Alexander Capehart
80e85bfffa
replaygain: add reset button to pre-amp dialog
Add a button to reset the pre-amp to it's default setting.

This way, you don't have to specifically seek to the 0 dB value in the
dialog in order to reset it.
2023-01-01 12:29:28 -07:00
Alexander Capehart
1f5594fb33
music: refactor metadata extractor
Refactor the internal tag management portion of MetadataExtractor into a
new "Tags" object that can now be re-used in the ReplayGain system.

This also does a minor rework to the ReplayGain object to make it
totally self-sufficient.
2023-01-01 10:38:50 -07:00
Alexander Capehart
dc46c49f07
list: add editable list listener
Add a listener for the editable lists in the queue and tab config
views.

This simply reduces the amount of duplicated code within both of those
views.
2022-12-31 13:47:13 -07:00
Alexander Capehart
493b0a9f32
all: rework context-dependent object use
Rework some of the taped together ways context-dependent objects were
replied on in-app, such as removing redundant constructs and extremely
hacky lifecycle mechanisms.
2022-12-31 11:12:50 -07:00
Alexander Capehart
4ed8a7e967
queue: scroll to top of list on song changes
Always scroll to the top of the queue list when the current song
changes.

This way, the user can see future items rather than past items.

In an ideal world, I would try to go to the center of the queue, but
it seems like the "average" scroll tends to settle at the top no
matter what I do, so whatever. There's also a slight in-accuracy
in what the app considers the "Top" of the queue, but that's considered
minimally detrimental given how much a QoL improvement this is.

Resolves #210.
2022-12-30 17:28:46 -07:00
Alexander Capehart
f416bb0d00
music: localize list values
When resolving the names of several artists or genres, use a localized
separator instead of a comma.

This makes list values more correct in other languages, if properly
translated.
2022-12-30 16:34:28 -07:00
Alexander Capehart
cf6e7a5f0d
music: add support for album date ranges
Add support for albums to have a range of dates.

Often compilation albums will have Songs released in different months
or years, so it makes some sense to show a date range rather than just
the ealiest date.

The only point at which the earliest date is still shown is in the home
view's popup, as maxiumum dates in a date range are not sorted by, and
so showing it doesn't make sense.
2022-12-30 16:09:41 -07:00
Alexander Capehart
affe5c482b
all: reformat code 2022-12-30 11:39:28 -07:00
Alexander Capehart
f6b7a8f448
music: formalize whitespace handling
Formalize how whitespace tags are handled.

The checks for blank tags and removal of trailing whitespace from tags
are now the same function, carefully used to prevent blank tags from
setting through.

More testing will need to be done in order to fully ensure this system
will work as intended.
2022-12-30 08:42:35 -07:00
Alexander Capehart
05cf0f7261
music: fix music loading crash with weird genres
Fix an issue where genres consisting only of whitespace crash the genre
parser, and thus the music loader.

Band-aid this by moving the trimming code out of splitEscaped and into
maybeParseSeparators. In a future version I'll need to figure out how I
want to handle these weird edge cases.
2022-12-29 21:09:35 -07:00
Alexander Capehart
6db50a0e45
music: fix incorrect cache fields
Fix incorrectly populated cache fields.
2022-12-29 20:07:25 -07:00
Alexander Capehart
56f134aba5
release: bump to 3.0.0
Bump the version to 3.0.0.
2022-12-29 14:49:07 -07:00
Alexander Capehart
32db8a591a
all: tie up loose ends
Tie up some loose ends before 3.0.0's release.
2022-12-28 15:44:44 -07:00
Alexander Capehart
cce7b766d7
all: reformat code
Reformat all project code
2022-12-26 19:59:27 -07:00
Alexander Capehart
900a64bc02
playback: add support for mp4 replaygain
Add support for MP4 ReplayGain tags. These are usually under a `----`
atom with an iTunes domain and ReplayGain description. These are
mapped to an ID3v2 internal frame within ExoPlayer, which is why
Auxio did not support them, as it only expected Vorbis comments and
ID3v2 TXXX frames.

Resolves #292.
2022-12-15 21:01:41 -07:00
Alexander Capehart
966789238e
ui: make lists more compact
Reduce top list spacing to 12dp, making lists more compact.

This is more in-line with material design, and improves user experience
on small screens.
2022-12-06 19:22:12 -07:00
Alexander Capehart
0598409ca5
detail: add loading indicator to song detail
Add a loading indicator to the song detail view.

This should make the loading process clearer for some songs that take
longer to load.
2022-11-22 11:15:02 -07:00
Alexander Capehart
a3772b65c0
ui: re-add more button
Re-enable the more button in preparation for multi-select.
2022-11-22 10:58:41 -07:00
Alexander Capehart
8df89db77b
music: backport full dates to older versions
Backport the code for full "Month + Year" dates to older versions with
the legacy Date API.

For the same of not missing bugs on newer devices, this is now what
will be used in Auxio.
2022-11-19 16:34:00 -07:00
Alexander Capehart
a7bd48b64a
Merge branch 'master' into dev 2022-11-16 08:46:23 -07:00
Alexander Capehart
6b1f3e4567
Version 2.6.4
Ready for version 2.6.4 of Auxio.
2022-11-16 08:20:37 -07:00
Alexander Capehart
2b35fd07b6
playback: disable bluetooth autoplay
Temporarily disable and clean up the bluetooth autoplay system for now
until I can get it working sensibly.
2022-11-14 20:46:12 -07:00
Alexander Capehart
aa805e351c
music: try to deduplicate multi-artist code
Try to move multi-artist playback/navigation into a single function.
This function is really bad and is tacked onto the most convienent
location without much thought. I really wish to move this into the
ViewModel flow eventually, but I have no idea how to architecture
that. Oh well.
2022-11-13 19:13:29 -07:00
Alexander Capehart
3a236bdaf4
detail: show list of artists in genre UI
Show a list of artists that contain songs from a particular genre in
the genre UI.

This used to be in really early Auxio versions, but was intertwined
with some really stupid genre functionality that would include songs
from an entire artist for some reason. Since now albums can be shown
in several artist entires, it makes no sense now what artists can't
be given the same treatment.
2022-11-13 18:43:42 -07:00
Alexander Capehart
1cf1451aef
music: add setting to hide collaborators
Add a setting to hide "collaborators", that is artists that do not show
up on any album artist tags.

This is mostly for my own use since I don't get use from useless
collaborator entries.
2022-10-20 18:36:51 -06:00
Alexander Capehart
daf1cf8590
music: show months in UI
If a song/album date has a month value, show it in the UI.

This hopefully improves the date experience for more well-tagged
libraries. Due to date limitations however, it is limited to
Android O onwards for now.
2022-10-20 18:07:36 -06:00
Alexander Capehart
f4d25f81cc
ui: fix black theme visual bug
Fix a visual bug with transitions in the black theme.
2022-10-18 19:50:02 -06:00
Alexander Capehart
186d5a9186
ui: use marquee in all playback info
Use marquee in all playback information.

It's the playback view, and thus "activated", so why not.
2022-09-26 14:10:33 -06:00
Alexander Capehart
5e0f778daf
image: unify cover settings
Unify the "Show Covers" and "Ignore MediaStore Covers" settings under an
new "Album covers" setting.

This will make it easier to extend to new forms of album cover
collection.
2022-09-26 13:47:43 -06:00
Alexander Capehart
7a055680bd
all: fix misc issues
Fix miscellanious issues that I've encountered.
2022-09-26 12:07:12 -06:00
Alexander Capehart
3e73cd8080
music: add caching
Add caching of already-parsed tag data.

This greatly reduces loading times when the music library has not
changed. This completes the music loader in it's entirety now.

Resolves #207.
2022-09-25 20:02:44 -06:00
Alexander Capehart
393bdf3110
info: redesign icon
Redesign the icon entirely.

Since the next release is 3.0.0, may as well refresh the icon.
- This icon is actually unique and not a reskinned material icon, which
I feel will diffentiate Auxio even more.
- While unique, it also blends into the surrounding app icons a lot
better, especially regarding using stroke/corner sizes.
2022-09-25 15:17:18 -06:00
Alexander Capehart
66b9da0d5e
music: add toggle to load non-music
Add a toggle to control the IS_MUSIC=1 selector.

This is normally used to remove non-music like podcasts and ringtones,
however some people use Auxio was a general-purpose audio player for
these files, so this setting can be used to disable that selector and
load non-music.

Resolves #246.
2022-09-24 16:11:25 -06:00
Alexander Capehart
adf85a8fab
settings: enable theme customization on >31
Enable theme customization on API 31.

Some people prefer some themes over others, so enable it. Not like it
increases complexity.

Resolves #243.
2022-09-24 15:37:37 -06:00
Alexander Capehart
b58fce9414
music: add musicbrainz id support
Add support for MusicBrainz IDs (MBIDs) in both grouping and UID
creation.

This should help with very large libraries where artist names
collide, thus requiring differentiation through other means. It also
theoretically opens the door to fetch online metadata, however I don't
really care for that and it would violate the non-connectivity promise
of Auxio.

Resolves #202.
2022-09-23 15:38:47 -06:00
Alexander Capehart
62ee46cfe6
music: add multi-artist support
Add semi-complete support for multiple artists.

This changeset completely reworks the music linker to add the following
new behaviors:
1. Artists are now derived from both artist and album artist tags,
with them being linked to songs and albums respectively
2. Albums and songs can now have multiple artists that can be distinct
from eachother
3. Previous Genre picking infrastructure has been removed and replaced
with artist picking infrastructure. "Play from genre" has been retired
entirely.

This is a clean break to the previous artist model and may not work
with all libraries. Steps to migrate the music library will be added
to the changelog.

Resolves #195.
2022-09-23 10:15:28 -06:00
Alexander Capehart
b6d1cd7cb0
music: add finalization routine
Combine validation into a new finalization routine that now
individually validates and in the future may finalize certain
fields that require linking to be properly created.
2022-09-18 19:58:17 -06:00
Alexander Capehart
9e9e1a007d
music: do settings-dependent parsing in song
Do settings-reliant parsing within the song class.

This way, song UIDs or future caching will not be unexpectedly broken
by changes in music settings.
2022-09-16 19:36:40 -06:00
Alexander Capehart
33b0aabc44
music: add support for compilation sub-types
Add support for compilation + live, compilation + remix,
and compilation + dj-mix release types.

This was not included due to the changes it required to the
parser. Turns out these changes are largely trivial if I do
more clever inlining.
2022-09-14 10:18:48 -06:00
Alexander Capehart
7bc9f4869b
music: switch sort names to collation
Use CollationKey when sorting music instead of String isntances.

This makes sorting aware of accented characters while still preserving
speed. I would ideally want to extend this to the search view too, but
there is no contains command in CollationKey, so I must continue with
the normalization method there.
2022-09-10 10:44:41 -06:00
Alexander Capehart
28d28287fe
music: refactor backends into extractors
Refactor all Backend instances into a new package called extractor and
a new structure called "Layer".

Layers are no longer generalized into an interface. Instead, they build
on eachother in order to produce a correct output of raw songs.

One of these layers is a stub class to eventually implement caching.

This changeset also phases out the "Ignore MediaStore tags" setting, as
it is no longer needed.
2022-09-08 20:41:08 -06:00
Alexander Capehart
2690e8343a
music: fix uid issues
Fix some mistakes with the UID hashing process.

Some more work needs to be done regarding formalizing the datatype
and tagtype fields. If anything, I may just collapse them into a
single "tag" field since they are only used for equality.
Alternatively, I could make them integers to increase efficiency.
Depends.
2022-09-07 10:35:26 -06:00
Alexander Capehart
fe5609b447
ui: fix click/menu issues
Fix some issues with how slapshod the menu/click code is.

This fixes a crash on the genre view when a song menu was opened.
2022-09-06 22:41:20 -06:00
Alexander Capehart
48ad45e4c3
music: rework id system
Completely rework the ID system to pave the way to MusicBrainz ID
support and greatly increase ID integrity in general.

This changeset removes the old ID field, an emulation of a polynomial
hash that was used in all items, and replaces it with a new type called
UID that is specific to Music. Other types just use plain equals now,
and most instances of "id" to check for equality in the app have either
been inlined into an equals override or removed outright.

The new UID format is as follows:
datatype/format:uuid

Datatype is a tag that is just the lowercase tag name. For example,
"song". Format is the program that created the UID. auxio will be an
md5 hash, and musicbrainz will the a musicbrainz ID extracted from a
file. UUID is the uuid itself.

This is much more reliable and extendable than the old ID format. This
will also be the last time I break compat with old ID formats. From now
on, a legacy UID field will not be included to enable backwards compat,
when the time comes for a breaking change.
2022-09-06 22:21:41 -06:00
Alexander Capehart
457013d047
playback: add framework for multi-parent playback
Add some functions to eventually enable multi-parent playback.

PlaybackMode is still used in some places, however will steadily be
phased out hopefully.
2022-09-06 13:12:25 -06:00
Alexander Capehart
a9bbdff25d
recycler: fix popup desync in grid layouts [#230]
Fix a popup desynchronization issue in grid-based layouts.

This issue stemmed from the popup index calculation apparently not
needing a division by the span count in order to produce the correct
index. This kind of makes sense, but is still really weird.

Resolves #230.
2022-09-05 19:45:51 -06:00
Alexander Capehart
c9422b7f9d
Version 2.6.3
Ready for version 2.6.3 of Auxio.
2022-09-03 12:48:14 -06:00
Alexander Capehart
47a26df92d
ui: update shots
Update the screenshots and feature graphic to reflect app changes.
2022-09-03 12:36:05 -06:00
Alexander Capehart
9f7a012706
queue: remove fast scroller
Temporarily remove the fast scroller for now, as I want to bundle it
with adding a scroller to the detail view in a single release.
2022-09-02 21:44:28 -06:00
Alexander Capehart
acaf679000
ui: add animated playing indicator [#218]
Make the playing indicator animate when playback is ongoing.

Previously state issues stopped me from doing this, but apparently this
time I miraculously got it working. Yay.

Resolves #218.
2022-09-02 13:16:29 -06:00
Alexander Capehart
3db68d47a6
playback: revert song menu move
Revert the song menu in the playback panel to being in the toolbar.

It was mostly inconsistent and cause a lot of truncation. I'll figure
out what I want to do when I implement liked songs.
2022-08-29 20:56:17 -06:00
Alexander Capehart
13793fdfe2
playback: add smooth seeking
Switch position math to rely on deciseconds (1/10th of a second)
instead of full seconds.

This makes seeking and position management much smoother, with minimal
performance cost. In the future I may try to migrate the playback state
so that the position calculations are done on the UI end, but this
works for now.
2022-08-29 09:46:42 -06:00
Alexander Capehart
1db5e02332
Version 2.6.2
Ready for version 2.6.2 of Auxio.
2022-08-28 12:25:49 -06:00
Alexander Capehart
016964e5d0
widget: update preview
Update the widget preview to reflect the new styling.
2022-08-28 11:59:22 -06:00
Alexander Capehart
ab59ca02fd
home: distinguish no popup value from no popup
Do not show the popup if there is no provider or valid position.

Might be useful for later.
2022-08-27 20:03:41 -06:00
Alexander Capehart
01891e98e0
ui: re-add missing icons
Re-add icons that were lost during the branding update.
2022-08-27 18:55:01 -06:00
Alexander Capehart
28ba8147f1
ui: temporarily remove more menus
Temporarily remove more menus for now.

There's just no window to add them for 2.6.2. I'll add multi-select
later.
2022-08-27 17:36:14 -06:00
Alexander Capehart
3c5ade33b5
info: update branding
Update the app icon and banner to be more nuanced and appealing.
2022-08-27 17:15:24 -06:00
Alexander Capehart
a2f27f303b
ui: add predictive back gesture
Rework the back pressed callbacks to support a predictive back gesture.

This completes the trivial Android 13 reworks.
2022-08-27 16:16:18 -06:00
Alexander Capehart
0b43dd011c
ui: animate play/pause button shape
Make the shape of the play/pause buttons throughout the app morph from
a circle if paused to a square if playing.

Android 13 seemingly does this to their play/pause button, so we copy
it too.

Tangentally related to #162.
2022-08-27 15:21:08 -06:00
Alexander Capehart
5b2817b2f2
playback: do not check for version w/notification
Do not check for the version when managing the notification.

Some OEMs will update the android system, causing the version number to
change, but will THEN not update the system UI, completely breaking my
compat hacks. Because you know. Reasons. Fix this by always applying
future and obsolete methods of updating the media notification
regardless of the context.

Resolves #219.
2022-08-27 14:15:14 -06:00
Alexander Capehart
7cc5c77ad7
playback: make session actions more efficient
Remove redundant updates for the playing state on Android 13 onwards.
2022-08-16 16:35:31 -06:00
Alexander Capehart
40a34f0596
playback: migrate media session to android 13
Migrate MediaSessionComponent to android 13.

This was primarily implementing custom actions with the media session
and adding some extra bug fixes that I was already planning. I was
really hoping that google fixes the nightmarish mess that was the
previous MediaStyle notification, where I had to update the session
and then the notification in a tight dance with clever tricks to not
get rate-limited, but nope. I still have to do exactly the same thing
as beforehand, but with even extra insanity due to the custom actions.
2022-08-16 15:49:54 -06:00
OxygenCobalt
982abe8cdb
strings: remove system ok/cancel names [#215]
Auxio tried to leverage built-in android string attributes for Ok and
Cancel while still completing them for other translations that were not
supported by the OS.

Turns out this was a terrible idea when I switched to Weblate, which
has no knowledge of this trick and could lead to a misleading
translation value. Remove it.

Resolves #215.
2022-08-12 16:04:41 -06:00
OxygenCobalt
2c5a1a0567
all: move menus to more button [#93]
Move all menu functionality from long-click to a menu button.

This is in preparation for #93, as I need to free up the long-click
for a selection option. The spacing isn't really consistent at all,
but that's because I wanted to make something that looks right
depending on the context.
2022-08-11 15:15:10 -06:00
OxygenCobalt
d4884cc9ca
playback: replace song options with equalizer
Replace the song options button in the playback menu with a button that
opens the equalizer.

I plan to re-introduce the song options in another location.
2022-08-11 12:18:14 -06:00
OxygenCobalt
ee68e7ffe9
playback: make replaygain always-on
Remove the "Off" ReplayGain setting, as it is mostly meaningless.

Users who don't want ReplayGain can remove the tags from their files.
No efficiency benefits either since the audio processor is always
disabled without replaygain tags. It is better not to confuse users
who do have ReplayGain but wonder why it is not working on their
files because the setting is off.
2022-08-11 11:44:19 -06:00
OxygenCobalt
b104dd151d
Version 2.6.1
Ready for version 2.6.1 of Auxio.
2022-08-10 15:30:59 -06:00
OxygenCobalt
fc5274ebeb
info: update
Update information in preparation for 2.6.1.
2022-08-10 14:31:16 -06:00
OxygenCobalt
68ca9973df
ui: add basic bar actions [#108]
Add the ability to customize the bar action to the repeat mode or
shuffle state.

This is a much smaller implementation than what I planned, mostly
because other options did not make much sense (queue) or were
superceded by better options (clear state).

Resolves #108.
2022-08-10 13:14:19 -06:00
OxygenCobalt
ce2e950a9b
playback: add audioeffect integration [#211]
Add support for external AudioEffect implementers, like Wavelet.

Doing this involves doing a weird broadcast dance with AudioEffect
Intents at special points to indicate a valid audio session that
can be manipulated. Still has some issues, such as a null name
showing up in wavelet. As far as I am aware, this is the best
possible system I can do, and allows me to delegate an equalizer
implementation to other apps instead of making my own.

Resolves #211.
2022-08-09 16:26:14 -06:00
OxygenCobalt
83d1e4eae4
ui: refactor shadow management
Make the shadow disabling workaround an XML style.

Doing it this way is more elegant than disabling it in-code.
2022-08-09 09:10:19 -06:00
OxygenCobalt
75e80a7253
home: add indicator to date added sorting
Add a fast-scroll indicator for date added sorting.

Forgot to add this initially.
2022-08-09 08:47:57 -06:00
OxygenCobalt
46473ceff9
ui: update transitions
Update transitions in the home fragment to X-axis.

I noticed a visual issue in the detail transition in the existing
version stemming from how the main fragment's drawing is clipped by
the bottom sheet, resulting in a less-than-ideal Z-axis transition.

While I wanted to fix this by attempting to switch to inset based
bottom sheet management, I still need to wait for more changes in
order to successfully pull that off, and hence I'll be reverting it
soon.

Moving these transitions to X-axis prevents this visual issue while
still being roughly semantically similar.
2022-08-08 16:17:46 -06:00
OxygenCobalt
0474940ee3
ui: switch to inset-based bottom sheet content
Do not do a measure + inset method with BottomSheetContentBehavior,
instead, try to re-apply window insets to adapt with the bar instead.

This fixes a lot of view clipping issues that made motion transitions
non-ideal and prevented a rounded playback bar. Only remaining issue is
RecyclerView instances, which need to be further reworked to resolve
scroll issues and edge effect problems.
2022-08-06 09:21:20 -06:00
OxygenCobalt
daaa8d7f7e
Version 2.6.0
Ready for version 2.6.0 of Auxio.
2022-08-05 18:43:54 -06:00
OxygenCobalt
5a829112da
meta: update shots
Upgrade screenshots for 2.6.0.
2022-08-05 17:40:58 -06:00
OxygenCobalt
fa06732e94
strings: remove weird capitalization
Remove strange capitalization choices in an attempt to make the app
more consistent.
2022-08-04 15:28:35 -06:00
OxygenCobalt
85eb4cad6c
playback: use height for playback layouts
Leverage min heights for the playback layouts instead of the land
modifier.

This prevents an issue where some split-screen displays won't use the
correct "compact" layout.
2022-08-04 10:16:26 -06:00
OxygenCobalt
7543f1defc
playback: add split ui in landscape
Add a split playback UI in landscape mode.

Apparently the mere act of doing this also fixes the infurating
window inset issue I previously did either. Odd.
2022-08-03 16:00:18 -06:00
OxygenCobalt
304fccf0f9
home: disable collapse when one tab
Disable the collapsing toolbar when there is only one tab.

The TabLayout is hidden when there is one tab, so collapsing it does
not make much sense.
2022-08-03 10:30:19 -06:00
OxygenCobalt
35cfea78df
recycler: remove useless header ids
Remove useless id fields from Headers, replacing them with vlaues
related to their string resource.

String resources and disc numbers are more or less garunteed to be
unique in Auxio's context.
2022-08-01 10:38:24 -06:00
OxygenCobalt
b42dfd0b53
all: misc changes
Miscellanious changes that accumulated over time.
2022-07-31 15:51:12 -06:00
OxygenCobalt
c3d8509069
ui: optimize bottom sheets
Desperately try to minimize the amount of layouts my bottom sheet code
is producing.

It still relayouts twice in one pass. I hate android.
2022-07-30 16:06:17 -06:00
OxygenCobalt
a4fa8a84fa
queue: reimplement with bottom sheet
Re-implement the queue, now leveraging a bottom sheet too.

This makes the queue much easier to open, and actually plays along with
the new transition system. I really hope this doesn't have a stupid
gotcha that ruins the UX. Please. Please. Please.
2022-07-29 14:40:58 -06:00
OxygenCobalt
cc3cb343b0
playback: use bottomsheetbehavior
Use BottomSheetBehavior with the playback sheet.

This is the result of two weeks of painful hacking to get a working
implementation that did not immediately have a brain aneursym. It
also requires me to still vendor BottomSheetBehavior for the time
being. However, this greatly reduces technical issues on my end and
allows the addition of new playback UI concepts, while still
retaining the UI fluidity of prior.
2022-07-29 12:21:06 -06:00
OxygenCobalt
62ae5e5cb2
build: update build scripts
Update/Modernize build scripts.
2022-07-29 11:03:22 -06:00
OxygenCobalt
fe16ffb5bf
queue: temporarily remove navigation
Temporarily remove queue navigation, as it can no longer really fit
with the new transitions.

This will eventually be replaced with a queue bottom sheet, implying
that I can abuse one into working.
2022-07-27 08:48:13 -06:00
OxygenCobalt
affa8c1c11
queue: add ability to play songs [#92]
Add the ability to jump to arbitrary points in the queue.

This comes at the cost of the long-press option to move items, since
they simply cannot co-exist without visual issues.
2022-07-25 12:20:46 -06:00
OxygenCobalt
eca385aea5
playback: hack around paused seeking issue
Hack around an issue where the notification position will not update if
one seeked while the player was paused.

This is the best implementation I can do that will not result in the
notification getting excessively rate-limited.
2022-07-25 10:41:21 -06:00
OxygenCobalt
0b1f0c3cda
playback: expose queue in mediasession
Expose the queue in the MediaSession, at least I hope.

The queue is still not mutable. Don't feel comfortable implementing that
until I rework the in-app queue UI.
2022-07-25 10:39:50 -06:00
OxygenCobalt
f206f08e79
music: handle multiple vorbis tags [#197]
Modify ExoPlayerBackend to handle the presence of multiple vorbis tags
for a particular key.

This is allowed by the spec and heavily leveraged by programs like
Picard. It also opens the door for better artist functionality, but
that is incredibly complicated and something I don't want to implement
right now.
2022-07-23 09:16:50 -06:00
OxygenCobalt
f75f75308e
music: add wakelock to indexerservice
Add a wake lock to IndexerService.

This ensures that the CPU is active throughout the whole music loading
process.
2022-07-20 11:08:02 -06:00
OxygenCobalt
30920b399a
info: update faq
Update FAQ.md to reflect the changes to the media indexer in the next
release.
2022-07-18 11:40:57 -06:00
OxygenCobalt
10362b9efc
music: lowercase names when hashing
Lowercase music names when hashing them to prevent drift stemming from
grouping.

The addition of the song may change the case of an artist if such
mitigations are in effect. To prevent such from invalidating music
hashes, we take the lowercase of every name hashed.
2022-07-17 16:11:16 -06:00
OxygenCobalt
51b9b0e734
widgets: dont use system padding in size compat
Don't take the app widget host padding into account when trying to
calculate the widget sizing.

Doing such produces bad results, at least on my devices. At least, it
does now for some reason.
2022-07-17 16:05:53 -06:00
OxygenCobalt
4d283bc91d
ui: fix app theme
Make the app theme (Shows before activity startup) the blue theme
instead of the default material purple.
2022-07-15 12:13:47 -06:00
OxygenCobalt
9f8ce49d70
search: add sort and file name to comparison
Make the search algorithm take in account the raw sort name and file
name when searching.

This allows the user to search for a particular song without typing in
a unicode/non-ideal title, instead typing in a latinized sort name or
suitable file name.

This does make Auxio's search a bit more fuzzy, but it still gets the
job done.

Resolves #184.
Related to #172.
2022-07-15 11:32:24 -06:00
OxygenCobalt
d4f74784ba
music: add date class
Add a new Date class to represent both years and more fine-grained
dates extracted using the ExoPlayer metadata system.

In-app, the year is still shown, but sorting will use the new precision
when present. The MediaSession will also post an RFC 3339 formatted
date with this new precision, as the MediaSession documentation states
I should. No clue if the latter will cause any bugs with naive metadata
UIs in other apps.

Resolves #159.
2022-07-15 10:23:01 -06:00
OxygenCobalt
7833ec4460
music: make field utils functions
Make some field utils functions, as they do work.
2022-07-14 11:43:28 -06:00
OxygenCobalt
969c0c69b7
music: add sort tag support [#172]
Implement sort tag support in the ExoPlayer backend.

Sort tags for grouping is still derived from the templates. Album
artist sort tags are only picked if one is present. System might be
a bit buggy at the moment given that it messes with grouping/sorting
a little.

Resolves #172.
2022-07-13 20:18:12 -06:00
OxygenCobalt
9921a39784
music: enable quality tags
Actually enable quality tags now.

Now that 2.5.0 is out, I can finally focus on the new metadata system.
2022-07-13 14:27:35 -06:00
OxygenCobalt
f3aca45690
settings: remove excluded dir migration code
Remove the excluded directory migration code, as it causes far more
issues than it fixes.

Due to an unfixable logic bug that occurs when trying to read the
setting, Auxio will always try to migrate the database when there is
no music folders, causing a hang in some situations. Fix it by just
removing the migration.
2022-07-12 09:59:08 -06:00
OxygenCobalt
6f8dc3c311
music: hide quality tags for now
Hide the new quality tags option for now.

This is not because I wanted to, but rather because of me wanting to
reduce the amount of bugs I will likely be thrown due to the release
of automatic rescanning.
2022-07-08 16:48:28 -06:00
OxygenCobalt
3a7768ad22
music: add automatic rescanning
Add automatic rescanning, for real.

This is the culmination of 6 months of work to make Auxio respond to
music updates and to research the most versatile implementation of
such. Is it the best system? No. It's actually a bit messy by necessity
in order to prevent bugs. Does it work well? Yes.

This will not be enabled by default, as it does require a battery
draining foreground service and is generally not useful for most
circumstances.

So glad to be done with this.

Resolves #72.
2022-07-08 16:42:23 -06:00
OxygenCobalt
83d6c529e2
all: misc ui reworks
Miscellanious UI reworks that accumulated over the past few days.
2022-07-07 10:40:18 -06:00
OxygenCobalt
a15bc79cc9
music: more hypothetical fixes
Fix a bunch of more hypothetical issues that could occur with runtime
rescanning. It's still global mutable concurrent state though. Sigh.
2022-07-04 11:20:02 -06:00
OxygenCobalt
b1a8544b73
ui: make toolbar fix dedicated class
Make the toolbar spacing fixes a dedicated class.

This resolves an issue on lollipop devices where the ripple would be
clipped.
2022-07-03 16:23:53 -06:00
OxygenCobalt
e1c55d5ddc
ui: revert rounded bottom sheet
Revert the optional rounded corners on the bottom sheet.

It was causing too many bugs to be a sensible addition. I will only add
it if Google moves WindowInset application to layout time AND only on
devices with the stretch overscroll implemented.
2022-07-03 11:29:01 -06:00
OxygenCobalt
3bdf7b136e
music: enable quality tags [#128]
Enable the ExoPlayer parser in the UI.

Now that runtime rescanning is implemented, this feature can also be
finally enabled.

Resolves #128.
2022-07-02 20:37:55 -06:00
OxygenCobalt
49a964705b
playback: sync mediasession and notif
Make notification updates entirely reliant on the MediaSession.

Android 11 and onwards automatically populate the notification with the
MediaSession state. This apparently conflicts with updating the
notification in some cases, resulting in the incorrect song being
shown. Fix this by not populating the notification from Android 11
onward and only posting it when the MediaSession state was set.

Resolves #179.
2022-07-02 14:04:21 -06:00
OxygenCobalt
3663396b97
ui: remove windowinsetscompat
Remove WindowInsetsCompat from the project, as it is a pile of garbage.

WindowInsetsCompat refuses to actually update the correct fields when
you transform it back into a WindowInsets. This makes it impossible to
use in Auxio. The fact that Google decided to make such an
overengineered wrapper to some version-specific methods is an absolute
joke. All you needed were some extension functions, but no, let's make
an entire wrapper class filled with so many gotchas as to be unusable.
2022-07-02 10:19:46 -06:00
OxygenCobalt
631120dafc
search: actually commit filter mode to settings
Turns out the filter mode was also not being committed to settings.

I have no idea how this slipped into production.
2022-07-01 20:39:23 -06:00
OxygenCobalt
8b8eebdd95
search: fix mismatched filter ids
Fix an issue were (at some point) the filter ID for display modes was
swapped out for drawable IDs.
2022-07-01 20:26:20 -06:00
OxygenCobalt
217ced8ade
ui: rework rounded covers into round mode
Rework the rounded covers option into a new "Round Mode" option.

This commit extends the rounded corners configuration to now the
widget, thus making the setting apply now to covers, the bar, and
the widget configuration. This makes a naming change useful.
2022-07-01 20:06:54 -06:00
OxygenCobalt
e41645ee28
widgets: rework button appearance
Further rework the button layout to be alike to other modern widgets.

This changeset transforms the play button into a FAB-ish thing,
makes spacing coherent between the uses of each layout, and adds
spacers to make the buttons layout in a more appealing way.
2022-07-01 12:25:59 -06:00
OxygenCobalt
249ddae269
ui: rework bottom sheet layout method
Rework the bottom sheet layout process to accomodate the new rounded
corners and be far more efficient.

This removes the weird content layout code and moves it into the inset
code, which not only allows content to show in the corners, but also
allows us to minimize the amount of layouts that we normally perform.
2022-06-29 11:17:50 -06:00
OxygenCobalt
c3721266b5
playback: use isactive in replaygain [#174]
Override isActive to control when the ReplayGain engine should
manipulate audio.

This makes the system much more efficient, as we can side-step a
useless copy when ReplayGain shouldn't be applied.
2022-06-26 19:19:28 -06:00
OxygenCobalt
630950ea5d
playback: force LTR on timeline controls
Force LTR on timeline controls, as per the Material Design guidelines.

The guidelines state that while "directional" UIs should be LTR/RTL
depending on locale, "timeline" UIs should always by LTR, as the
direction of time is universal. Auxio did not do this, and so the
timeline controls would be RTL on other elements. Fix this by forcing
LTR on the UI elements that correspond to timelines.

Now, this is not the best system. To ensure that the rest of the layout
remains sane, much of the directional views have to be wrapped in a
redundant layout, which is somewhat in-efficient. However, the impact
seems to be at least negligable.
2022-06-22 12:38:00 -06:00
OxygenCobalt
55f9d4c819
ui: rework sorting again
Rework Sort again into a new class that leverages a better Mode design
and static comparator instances.

This somewhat improves efficiency, but is also far easier to work with
and has far less footguns with adding new sorts.
2022-06-22 11:08:58 -06:00
OxygenCobalt
316a0e719c
ui: rework typography
Completely rework app typography.

Today I found out that inter has a tool that allowed you to generate
line spacings for a particular font size. Several hours later, I
regenerated the entirety of Auxio's typography to use this new system.

Moreso, I also tried to eliminate some of the non-standard text styles
that I was using prior. That failed. Mostly there's two edge-cases
regarding title bolding and the playback view that I simply cannot
work through right now, since M3's typography system is horribly
restrictive.
2022-06-21 20:19:52 -06:00
OxygenCobalt
7edd8002f1
deps: update exoplayer to 2.18.0
Update ExoPlayer to 2.18.0 and fix all of the breaking changes.
2022-06-21 11:42:17 -06:00
OxygenCobalt
8465cda637
playback: allow customization of detail playback
Add a new "Detail playback mode" option that allows one to configure
what selecting a song will do in an album/artist/genre.

This is mostly a clone of the prior setting, just in a new context.

Resolves #164.
2022-06-21 09:13:57 -06:00
OxygenCobalt
bd92ba2175
settings: improve preference management
Rework the preference classes to reduce the horrible bloat of the
recursivelyHandlePreference function.

This was mostly implementing new methods into IntListPreference and
adding a new preference to represent the weird, "generic" dialogs that
are used at points. While some preferences still need to be tweaked in
recursivelyHandlePreference, it is nowhere near as bad as it was prior.
2022-06-20 11:12:55 -06:00
OxygenCobalt
532a30325a
settings: revamp settingsmanager into settings
Revamp the shared object SettingsManager into a standalone utility
called Settings.

This makes many things easier in Auxio. It completely unifies the key
format that we use (Android Strings instead of Java consts), eliminates
the pretty dumb initialization method that we use, and eliminates the
dubiousness of holding a Context-related utility in a global field.

The only cost was having to migrate even more ViewModels to Android
ViewModels. Whatever.
2022-06-20 09:12:19 -06:00
OxygenCobalt
29fe849565
playback: add shuffle shortcut
Add a shortcut to shuffle all songs.

This is likely the only static shortcut Auxio will have. Top tracks
and recently added are completely useless for me, so I will never
add them. I may add more dynamic shortcuts for recently played items,
however.

Note that we use a basic black shuffle icon here. I will not add icon
customization to these shortcuts.
2022-06-18 11:20:22 -06:00
OxygenCobalt
20e7b25808
queue: fix visual issue with transition
Fix a visual issue with the queue animation where the playback view
will still slightly show.

This was caused by the lack of a background in the queue fragment UI.
2022-06-18 08:46:10 -06:00
OxygenCobalt
cf8e887f9a
all: use compat when stopping foreground services
Use ServiceCompat.stopForeground instead of stopForeground.

This is preliminary preparation for Android 13. I can only change SDK
versions however when the Android Gradle Plugin makes a new release
though.
2022-06-16 15:35:16 -06:00
OxygenCobalt
f187900d0c
Version 2.4.0
Ready for version 2.4.0 of Auxio.
2022-06-16 15:07:44 -06:00
OxygenCobalt
49e3c51bb6
ui: fix rtl issues
Fix minor RTL issues across the app. Except for the controls. I have
zero idea how to fix that.
2022-06-16 11:00:17 -06:00
OxygenCobalt
668006724b
ui: make default accent dynamic on api 31
Make the default accent the dynamic accent on API 31.

This is to make Auxio's Material You support obvious to the user.
2022-06-15 20:09:23 -06:00
OxygenCobalt
e6f6d1ccf8
image: remove animated indicator
Remove the animated indicator, replacing it with a static one.

I wish I could have kept this, but once again android is a sh******ed
mess and makes it impossible to dynamically animate something depending
on the playing state. It will restart the animation, ignore calls to
stop, or just flat out now run the code path in the first place due to
race conditions.
2022-06-15 16:11:41 -06:00
OxygenCobalt
2f85d694d1
ui: remove actionmenu for menufragment
Introduce MenuFragment in order to replace ActionMenu.

ActionMenu was a terrible class filled with hacks. Introduce a new
fragment called MenuFragment that enables the same features, plus:
1. Requiring consumers the specify the menu, which prevents issues
from one-size-fits-all menus (unless absolutely necessary)
2. Fixing an issue where multiple menus appear at once
2022-06-15 10:05:08 -06:00
OxygenCobalt
5d1eaf72dd
detail: add queue actions to artist/genre
Add play next/add to queue actions to artists and genres, as the queue
system now makes their UX reasonable.
2022-06-14 17:40:33 -06:00
OxygenCobalt
8adf5e978d
music: dont make path parsing redundant
Don't do API 21 path parsing on API 29.

There's no need yet, so it's better to skip the step and make the
loading process more efficient.
2022-06-14 13:33:10 -06:00
OxygenCobalt
cb8c3306eb
all: minor cleanup
Do some minor housecleaning across the app.
2022-06-12 21:02:15 -06:00
OxygenCobalt
9b13b4c94e
music: revamp excluded into music dirs
Completely rework the excluded directory system into a new
"Music Folders" system.

This is implemented alongside a new "Include" mode. This mode
allows the user to restrict music indexing to a parsicular folder.
I've been reluctant to add this feature, as having two separate
options seemed bad. This resolves it by effectively packing whether
to include/exclude directories into a single option.

Resolves #154.
2022-06-12 15:55:25 -06:00
OxygenCobalt
5d124ce771
ui: use scroll indicators
Use basic scroll indicators when a dialog shows a list.

Mostly for material guidelines. Excluded dialogs and int pref dialog
have not been modified, as I am still working on revamping those.
2022-06-12 09:31:59 -06:00
OxygenCobalt
483d26d155
settings: make rounded covers independent
Make it so that the rounded covers option is not dependent on the show
covers option.

Rounded covers has no relation to whether to show covers (at least not
anymore with the new cover style), so it makes no sense to disable it
when show covers is turned off.

Resolves #152.
2022-06-11 16:31:23 -06:00
OxygenCobalt
47437c355d
music: eliminate odd songs with no size
Remove malformed songs that have a size of 0 bytes, but are still
present in MediaStore.

This issue only seems to occur when files are transferred via MTP, but
are not loaded due to storage issues.
2022-06-11 16:30:01 -06:00
OxygenCobalt
d80c49f11f
image: add image group
Add a new view called ImageGroup that will handle all advanced image
hacks from now on.

This includes the indicator (which is now animated), any selection
indicators, and the weirdness of the album song image. All of that
is now handled by ImageGroup. This is the culmination of probably
a day and a half of wrangling with android insanity and having to
remove a lot of what I liked about the indicator in order to make
this work on a basic level.

The only major bug I am currently aware of with this is that the
indicator is bugged out on Lollipop devices due to bad vectors.
Again.

I never want to do this again. I cannot believe that adding a basic
indicator took this long and required so much stupid hacks and
inefficient code. And then google wonders why android apps are so
visually unappealing and janky and laggy. Hm. Must be that devs aren't
using the brand new FooBarBlasterFlow library!
2022-06-10 11:57:50 -06:00
OxygenCobalt
ffe7298665
ui: add image playing indicator
Add a playing indicator to cover art.

This is simply to improve the general aestethics of this view. Of
course, the current way I implement this is incredibly stupid and I
plan to replace it.
2022-06-10 09:48:51 -06:00
OxygenCobalt
1d66907862
ui: remove edge-to-edge option
Remove the edge-to-edge option, as it turned out to be useless
with #149.
2022-06-09 17:03:38 -06:00
OxygenCobalt
a56d5849db
ui: update bar styles
Update the styles of LinearProgressIndicator and Slider to be similar
across the entirety of the app.
2022-06-08 09:59:28 -06:00
OxygenCobalt
f85f366144
ui: change adapter animations
Rework the submitList animation to be less resource intensive and nicer
looking (at the cost of scroll positioning)

notifyDatasetChanged is slow and has no animation, but list diffing is
chaotic and basically useless outside of search. However, clearing the
adapter and then populating it with new items seems to work quite well,
albeit with the scroll position being lost sadly. Switch to that.
2022-06-07 19:14:54 -06:00
OxygenCobalt
fb3c32b14c
music: split display name fix across versions
When having to fall back to an alternative displayName field, use
the version-specific RELATIVE_PATH and DATA fields when necessary.
2022-06-05 19:11:58 -06:00
OxygenCobalt
b2ad54eef3
image: make bitmap provider use generation system
Make BitmapProvider leverage the generation system used in Indexer.

This helps reduce the surface for instruction-by-instruction race
conditions.
2022-06-04 13:42:16 -06:00
OxygenCobalt
09392ef381
music: improve indexer state management
Improve Indexer's state management by splitting up the current loading
state and the last response.

This is intended to resolve a bug where if the UI task and
IndexerService are both killed, the Indexer state would become
indeterminate and the library would not show. Resolve this by keeping
track of whatever the last completed state was and falling back to it
whenever the loading process is canceled.
2022-06-04 10:12:31 -06:00
OxygenCobalt
66b95cef42
deps: upgrade
AndroidX core -> 1.8.0
Material Components -> 1.6.1
2022-06-03 14:15:23 -06:00
OxygenCobalt
5bc5afa162
fastlane: fix image metadata
Fix slight screenshot discrepancies where shot7 would show the old
song sub-heading.
2022-06-02 17:05:42 -06:00
OxygenCobalt
bb1d660eae
music: add loading progress indicator
Add an indicator to gague the current music loading progress.

This is actually a lot harder to implement than it might seem, not only
due to UI state issues, but also due to the fact that MusicStore needs
to keep it's state sane across a myriad of possible events that could
occur while loading music. This system seems like a good stopgap until
a full service-backed implementation can be created.
2022-06-02 15:16:32 -06:00
OxygenCobalt
14c9bbd4f9
all: cleanup
Miscellanious clean-up.
2022-06-02 13:57:29 -06:00
OxygenCobalt
e73d10070b
all: use notifyItemChanged everywhere
Apply the notifyItemChanged fix everywhere by making it an explicit
part of the RecyclerView framework.

This way, implementing future selection and rewrite behavior will be
much easier, as the payload argument is available in every adapter
implementation.
2022-06-02 10:42:33 -06:00
OxygenCobalt
182b08ab65
playback: fix state restore regression
Fix a state restore issue that would cause the parent to restore
incorrectly.

At some point, I accidentally used the index for the PlaybackMode field
when restoring the playbackState. This resulted in the playback mode
effectively reverting to ALL_SONGS and causing a number of subtle
issues.
2022-06-02 09:20:31 -06:00
OxygenCobalt
07127403ff
music: fix minor indexer issues
Further refine the Indexer and ExoPlayerBackend implementations.

These fixes were primarily focused on ensuring stable grouping through
stable sorting order, and more graceful handling of edge cases in
ExoPlayerBackend.
2022-06-01 15:50:49 -06:00
OxygenCobalt
a65d37c421
all: switch to stateflow
Switch from LiveData to StateFlow.

While LiveData is a pretty good data storage/observer mechanism, it has
a few flaws:
- Values are always nullable in LiveData, even if you make them
non-null.
- LiveData can only be mutated on Dispatchers.Main, which frustrates
possible additions like a more fine-grained music status system.
- LiveData's perks are exclusive to ViewModels, which made coupling
with shared objects somewhat cumbersome.

StateFlow solves all of these by being a native coroutine solution with
proper android bindings. Use it instead.
2022-06-01 11:46:00 -06:00
OxygenCobalt
2576fb26ba
music: introduce backend system
Move out the MediaStoreCompat interface into a full interface called
Backend.

In preparation for direct metadata parsing, it would be useful to
create some kind of object system to properly handle the capabilities
of each metadata indexing mode. Backend fulfills that by allowing
each object to implement their own query and then loading routine.

This system is designed somewhat strangely. This is firstly because
the ExoPlayer metadata backend will have to plug in to the original
MediaStore backend, so making methods more granular allows the
ExoPlayer backend to avoid some of the stupid inefficiencies from
the actual MediaStore backend, such as the genre loading process.
We also want to separate the steps of loading music in order to
more adequately show the current loading process to the user in
a future change.
2022-05-28 13:13:19 -06:00
OxygenCobalt
c6d7d8fe39
playback: implement "safe" slider wrapper
Implement a safe slider wrapper that does not crash with invalid values
as often.

Slider is a terrible component that is not designed with Auxio's
use-case in the slightest. Instead of gracefully degrading with invalid
values, it just crashes the entire app, which is horrible for UX.

Since SeekBar is a useless buggy version-specific sh******ed mess too,
we have no choice but to wrap Slider in a safe view layout that
hopefully hacks with the input enough to not crash the app when doing
simple seeking actions.

I hate android so much.

Resolves #140.
2022-05-27 14:34:14 -06:00
OxygenCobalt
852630ab38
Version 2.3.0
Ready for version 2.3.0 of Auxio.
2022-05-26 16:33:47 -06:00
OxygenCobalt
444e4299d6
widgets: revert most widget changes
Revert the introduction of the thin/tiny widgets, but keep the new
cover layout I created while working on them.

There is simply no way I can cram controls and metadata within the
size bucket that the thin widget occupies. I have decided to give up
and revert the widget to it's old form.

I understand why the thin widget is not appealing. However, the sizing
at which a widget can properly accomodate a taller widget is just too
precise and not really large enough to justify it's existance.
2022-05-25 11:03:59 -06:00
OxygenCobalt
e1e032d254
ui: re-add accent customization >api 31
Re-add accent customization on Android 12 and above.

Previously, I disabled accent customization since I thought they were
more or less useless with the new Material You dynamic colors system.
Turns out I severely underestimated how horribly OEMs would botch the
dynamic colors system. Guess I was blinded by my adherence to the pixel
line. Re-add the accent customization for those who do not have a good
dynamic color palette at all.

Resolves #131.
2022-05-24 12:52:09 -06:00
OxygenCobalt
485c35d74c
all: hack around more lollipop issues
Hack around more insane lollipop bugs, such as:

- The angular auxio icon crashing the system UI
- Optimized icons being corrupted
- Setting image alpha not working properly

I really wish I could drop support for this horrible version, but I
either have to wait for a major library to drop support or for the
usage numbers to reach 1%.
2022-05-22 17:12:49 -06:00
OxygenCobalt
2c7dd1241b
style: remove android string references
Remove references to android system strings, in favor of in-house
translations.

Previously Auxio would use the `android.R.string.ok` and
`android.R.string.cancel` strings to represent Ok and Cancel
respectively, but these system strings are actually untranslated on
some devices, so it is better for i18n if we use our own strings
for such.
2022-05-22 09:56:25 -06:00
OxygenCobalt
2d7dbd19cd
ui: rework custom ui components
Refactor the package structure and implementation of custom UI
components.
2022-05-21 14:52:08 -06:00
OxygenCobalt
28cedd1240
music: attempt to handle bad DISPLAY_NAME [#120]
Add recovery code to the music indexer in the case that Android doesn't
provide the DISPLAY_NAME field.

Nominally this should never happen, but OEMs will OEM and apparently
this does happen on some devices. Try to recover by grokking DATA for
a file name.
2022-05-19 17:37:19 -06:00
OxygenCobalt
c522af546c
detail: add full disc number support
Finalize the disc number implementation within Auxio.

This is probably one of the most widely-requested features outside
of playlisting. This implementation also adds some more fine grained
sorting modes for disc numbers in particular, which actually removes
some of the quirkiness of the Sort class.

Resolves #96.
2022-05-19 16:43:01 -06:00
OxygenCobalt
1a9e55e73b
about: add full library statistics
Split off the "songs loaded" about item into it's own card called
"library statistics"

This card includes the song, album, artist, and genre counts,
alongside a total duration of the music library. This is just more
informative and useful to the user.

Resolves #121.
2022-05-04 20:20:47 -06:00
OxygenCobalt
2bdbe212df
playback: decouple fields and callback
Decouple the callback notifying code and the field code. This makes
code more reasonable for future changes.
2022-04-29 12:07:14 -06:00
OxygenCobalt
3a19d822ce
music: rework name heirarchy
Once again rework the naming system for music, this time with it being
much easier to localize (hopefully).
2022-04-03 12:54:29 -06:00
OxygenCobalt
e387e72b2c
detail: update album song layout
Update the album song layout to be more alike to other songs.

Recently I migrated the TextView in the album songs to use 48dp sizing,
like the other song views. However, this resulted in a lot of empty
space that felt off. Fix this by adding a light background to the track
number, which fills the room it takes up a bit more. It also hopefully
primes the track number to take an indicator once multi-select is
added.
2022-03-29 20:08:57 -06:00
OxygenCobalt
59a56090e8
playback: add positive replaygain values
Implement support for positive ReplayGain values.

Turns out the blocker for this with the new AudioProcessor was that
I did not properly clamp PCM data when I manipulated the data,
resulting in target samples like 75491 being truncated to lower
values like 9955, which resulted in popping. This is a niche addition,
but also puts Auxio in a category that no other (FOSS) android music
player currently occupies. Yay.

Resolves #115.
2022-03-28 19:58:25 -06:00
OxygenCobalt
b4abad26cd
playback: migrate replaygain to audioprocessor
Create an AudioProcessor implementation for ReplayGain.

Now that ExoPlayer handles AudioFocus, the ReplayGain implementation
would conflict with the changes that ducking would make to the volume.
To fix this, migrate the ReplayGain implementation to a dedicated
audio processor. This not only resolves this system, but also opens the
door for positive ReplayGain values in the future. Currently however,
our method for modifying the bitstream results in popping with values
above the reference volume, so some more work must be done in that
regard.
2022-03-27 20:33:01 -06:00
OxygenCobalt
b748d73abb
playback: rework audio focus
Rework audio focus to rely on the native ExoPlayer implementation
instead of a custom implementation.

Previously, we avoided ExoPlayer's AudioFocus system as it never
played after a transient lost. A few versions later now through,
now it does, so we may as well switch to it. This does introduce
a bug where ReplayGain functionality will conflict with audio
focus, but I hope to eliminate this with #115 as I switch to
an AudioProcessor instead of a callback.
2022-03-27 11:51:58 -06:00
OxygenCobalt
ee1a234e76
ui: rework base adapter class
Completely rework the base adapter class to require less boilerplate
and properly handle cases such as diffing. The major adapters have
been migrated to this system, but the other adapters have not been
changed so far.

This is only part 1 of a multi-part rework, as this is an incredibly
complex system.
2022-03-26 10:16:36 -06:00
OxygenCobalt
e4d4266e35
playback: rework playback slide up implementation
Rework the playback slide up implementation to be more straightfoward.

This is really composed of stylistic improvements, very little in
actual behavior changes. This does re-introduce a regression when
nothing is playing where the scroll position will become off when
rotating, but that desynchronization happens often so unless I were
to completely migrate both the panel and the bar to a view, I don't
really see it as an issue.
2022-03-20 12:33:49 -06:00
OxygenCobalt
2ff7d93263
all: view cleanup
Do even more cleanup regarding views.
2022-03-13 18:56:24 -06:00
OxygenCobalt
33da09a08a
all: switch to spotless
Switch to the spotless linter with ktfmt used as a backend instead of
ktlint.

This switch was done for two reasons:
1. ktfmt is more thorough than ktlint
2. License headers can be added more effectively with spotless than
the default Android Studio behavior.

Dump all of the changes now so I don't have to deal with it over a long
period of time. I don't care.
2022-03-13 17:38:19 -06:00
OxygenCobalt
82247775ac
Version 2.2.2
Ready for version 2.2.2 of Auxio.
2022-03-08 16:19:02 -07:00