Commit graph

1416 commits

Author SHA1 Message Date
OxygenCobalt
402a290db7
Merge branch 'yurical' into dev
Add Korean translations.
2022-05-29 20:09:26 -06:00
OxygenCobalt
6b06afdef5
Merge branch 'patch-1' of github.com:yurical/Auxio into yurical
Add Korean translations.
2022-05-29 20:09:09 -06:00
OxygenCobalt
caaeaca494
home: rework loading screen
Move the loading screen into the home view.

Previously, we would use a Snackbar to track the music loading state.
This ended up being a pretty stupid and buggy idea, and would get even
worse with the new music loader changes. Instead, we re-implement the
loading screen into the home view to generally be more sane and
extendable compared to previously.
2022-05-29 20:07:07 -06:00
Yurical
ba10e0e3e1 add Korean translation
This commit adds Korean translation for Auxio, including app
translations and F-Droid descriptions.
2022-05-30 08:09:42 +09:00
OxygenCobalt
f52fa7f338
music: cleanup implementation
Clean up the indexer implementation even further.
2022-05-29 10:09:49 -06:00
OxygenCobalt
48289ef006
all: make callbacks initialize impls
Make addCallback calls (or similar) initalize the caller by calling the
specific callback methods.

This is primarily intended as a fix to an issue where the music library
would actually reload during a warm start. This is extremely bad, but I
hope it doesn't make the app too unusable until the next version.
2022-05-28 20:00:10 -06:00
OxygenCobalt
47726c3e02
music: add exoplayer backend [#128]
Add an ExoPlayer-based metadata backend.

This backend finally allows Auxio to parse metadata internally, which
has been a highly requested feature given how many unfixable MediaStore
issues it would fix.

However, this is not fully ready for production yet. The loading
process becomes much larger with manual parsing, the current
implementation still allocates picture metadata (terrible for
efficiency), and there is no good indicator in the app to keep
track of music loading.

As a result, this backend is disabled until it can be fully integrated
into Auxio's architecture.
2022-05-28 19:52:23 -06:00
OxygenCobalt
87bdf50d39
music: clean implementation
Clean up the music implementation heavily, removing redundant code and
splitting off some code into utilities.
2022-05-28 14:49:18 -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
df4ecc0137
sort: add disc number sorting to other sorts
Add disc number sorting to sorts that originally sorted by track.

Forgot to add disc sorting to the other sort modes when adding disc
number support. Fix that.
2022-05-26 15:58:35 -06:00
OxygenCobalt
c0da3673c2
fastlane: update screenshots
Update app screenshots for 2.3.0. Notably, a new album screenshot has
been added showcasing the new disc functionality.
2022-05-26 15:51:17 -06:00
OxygenCobalt
f34ea7f863
deps: upgrade deps
Once again
Gradle -> 7.4.2
Spotless -> 6.6.1
Ktfmt -> 0.67
2022-05-26 10:29:41 -06:00
OxygenCobalt
b59ef1a746
info: update architecture
Update architecture to reflect the new changes made in 2.3.0.
2022-05-26 10:03:41 -06:00
OxygenCobalt
1a02aaad4b
music: use correct version impl for discs
Create separate routines to parse disc and track numbers in the most
optimal manner.

On API 30 (Android R) and above, ensure that we are using the superior
CD_TRACK_NUMBER and DISC_NUMBER database fields, while below API 30,
stick with the normal TRACK field.
2022-05-25 16:38:57 -06:00
OxygenCobalt
ae62572760
strings: update german translations
Update german translations for the strings I can translate at least
okay.
2022-05-25 13:20:50 -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
4c74879cf1
playback: use gesture insets on panel
Also use the gesture insets on playback panel.

Turns out when the panel uses normal insets, the playback panel is
extremely close to the system bars. Fix this by using the bigger
gesture insets.

Resolves #137.
2022-05-24 17:24:21 -06:00
OxygenCobalt
b320f4b1bd
widgets: add thin widget
Rework the smallest widgets to have no textual metadata, alongside
adding a new widget size class.

Turns out the last tiny widget redesign made the controls far too
small. Instead, remove the textual metadata and make these widgets
more akin to the small and wide widgets. This also introduces a new
side class alongside that with more controls, again to make it
similar to the other size classes.
2022-05-24 17:12:48 -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
eb293022e8
widgets: rework tiny widget
Rework the tiny widget to cram even more information into it.

The tiny widget is nominally meant for edge cases like exceptionally
small screens or landscape mode, but apparently it's triggered on some
devices in normal use because of platform fragmentation and OEM insanity.

Update the tiny widget layout with some new buttons in order to make it
more usable in mnormal use. This is still nowehre near ideal. For
example, when triggering the layout on my device, it ends up squishing
the buttons. But it should probably work better outside of those edge
cases.
2022-05-24 10:08:12 -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
594fa3597e
playback: add delayed action system
Replace the hodge-podge framework of state restoration and URI playing
with a single "delayed action" system.

Auxio's initialization routine is a total cluster----. This is mostly
because it involves multiple asynchronous operations such as music
loading, state restore, and service starting which tend to make it
highly prone to race conditions and other insanity.

In particular, the way Auxio would attempt to restore playback and
handle file opening was a spaghetti pile of bad API boundaries and
dubious UI code. This has not changed. I want to move this routine
to the service, but it's lifecycle is also sh------ed to such an
extent where that would be nearly impossible. Instead, this commit
introduces a new "delayed action" system that bites the bullet and
allowes PlaybackViewModel to accept a context and an action in
return for initializing playback...eventually.

I tried my best to eliminate as much memory leaks as I physically
could here, but could only go so far. Still though, even this insane
system is better than the UI-level LiveData shenanigans I did
previously, and actually works compared to the broken android
components that google keeps wanting you to use.
2022-05-22 11:55:17 -06:00
OxygenCobalt
1ac55c534e
detail: add duration sort
Add the duration sort to the detail views.
2022-05-22 10:01:16 -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
21fccf1f31
playback: add pre-amp customization
Implement a UI frontend for customizing the ReplayGain pre-amp value.

This finally completes Auxio's ReplayGain implementation. Not only
that, it also shows how Auxio can use positive ReplayGain values,
unlike other apps.

As a side-note, this also fiddles with the dialog style somewhat.
I got carried away.

Resolves #114.
2022-05-22 09:32:23 -06:00
OxygenCobalt
519de0e1d5
playback: add framework for handling pre-amp
Implement an internal setting for a ReplayGain pre-amp setting.

Pre-amp is a lot like above reference volume regarding Auxio's
ReplayGain implementation, where I want to implement it in order
to allow ReplayGain to graduate from being labeled "experimental".

No UI frontend has been implemented just yet.
2022-05-21 16:34:20 -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
61839405ce
home: hide tabs when there is only one
Hide the tab selector when there is only one tab.

This is mostly to remove a redundant UI element that has no purpose
when only one list is shown.
2022-05-20 20:01:14 -06:00
OxygenCobalt
28feebcec3
sort: add duration and count sorts
Add sorting modes for duration and song count.

This was requested previously in the now-closed UI/UX changes
megathread, however I have only gotten to it now.
2022-05-20 18:33:56 -06:00
OxygenCobalt
059652d2f1
all: fix misc issues
Fix miscellanious issues with documentation and the playback system
2022-05-20 11:30:56 -06:00
OxygenCobalt
9edc113ebb
Merge branch 'enricocid-it_translations' into dev
Update italian translations
2022-05-19 19:32:42 -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
0b9141d474
sort: rework implementation
Rework the sort implementation to allow Auxio to leverage it's sorting
capabilities in a more powerful manner.

This is mostly the removal of stupid redunant methods and the change of
Sort overrides to sort in-place. This just gives us the option to avoid
full blown list copies in cases where such is reasonable.
2022-05-19 17:16:33 -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
04f254f91b
music: add disc number indexing
Change the indexer to parse out the disc number field from
AudioColumns.TRACK.

On newer versions, I hope to further modify the loader to use
the API 30+ CD_TRACK_NUMBER field, as it is more versatile than
TRACK.
2022-05-18 20:03:45 -06:00
OxygenCobalt
6f2a0d66c6
detail: add framework for disc number items
Add the UI and data components for a disc number value within the album
detail view.

This is the first-step of a multi-step addition to finally implement
disc numbers.
2022-05-18 17:30:50 -06:00
OxygenCobalt
5381e9f9a2
playback: remove media button reciever impl
Make MediaButtonReceiver an empty class without any behavior.

The previous manner in which Auxio would handle media button events
was actually bad, as in certain cases (like a rewind or if there was
no song playing) Auxio would actually crash, as the service would
not start a foreground state in time.

Fix this by removing that functionality. This should hopefully still
retain the current state.
2022-05-17 06:29:55 -06:00
OxygenCobalt
4a79de455a
playback: rework service components
Try to rework the playback service components to reduce race conditions
and improve readability.

This changeset has gone through a number of changes. I originally
wanted to unify all cover loading under a single "Component Manager",
but this turned out to be stupid given that the three service components
are different in nearly every way. Instead I just reworked them all
individually by introducing a new less-data race-prone image loading
framework, and moving around a bunch of code I was planning to move
around.
2022-05-16 20:37:42 -06:00
Enrico D'Ortenzio
e785f5a3a5
Update it translations 2022-05-15 16:03:16 +02:00
OxygenCobalt
d296a3aed9
all: rework formatting
Do some miscellanious formatting reworks.

1. Remove all instances of m in favor of _. _ is only used when names
collide or if something should be internal.
2. Make fragments apply their own click listeners.
3. Remove instances of inc/dec and replace them with the more
straightfoward + 1 or - 1.
2022-05-11 19:03:56 -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
ac6a471318
playback: fix index bug
Fix some index bugs by using inc/dec instead of ++/--.
2022-05-02 18:35:26 -06:00
OxygenCobalt
e451bc9859
playback: rework state restore
Rework state restore to be more coherent and in line with the new
member layout of the general

This primarily involves making the index the primary database attribute
in favor of song, with the old song id field becoming a sanity check
field.
2022-05-02 17:43:01 -06:00
OxygenCobalt
1e7a439c31
deps: switch material to 1.6.0-rc01
Switch material components to the more stable 1.6.0-rc01. Have to deal
with android complaining, but whatever.
2022-05-01 17:54:37 -06:00
OxygenCobalt
0d9d6b153b
Merge branch 'enricocid-it_translations' into dev
Update italian translations
2022-05-01 17:50:57 -06:00
enricocid
ece5dc06c0 Italian translations
Signed-off-by: enricocid <enrico2588@gmail.com>
2022-05-01 21:44:13 +02:00
OxygenCobalt
a645c3a217
deps: upgrade deps
aaaaaaa
coil -> 2.0.0-rc03
material -> 1.7.0-alpha01
leakcanary -> 2.9.1
navigation -> 2.4.2
kotlin -> 1.6.21
agp -> 7.1.3
2022-04-29 20:14:17 -06:00
OxygenCobalt
d57f980148
playback: cleanup components
Fix miscellanious bugs and clean the component code.

Currently the components are in a strange state. They are a big ball of
mud with inconsistent lifecycles and callbacks. I want to find a way to
unify them under a single lifecycle, but the competing nature of them
makes this extremely difficult.
2022-04-29 19:53:58 -06:00