Commit graph

1824 commits

Author SHA1 Message Date
Alexander Capehart
5825a29e00
Merge branch 'dev' of github.com:OxygenCobalt/Auxio into dev 2023-06-15 12:58:54 -06:00
Alexander Capehart
839861b6b8
music: fix grouping regressions
Fix regressions in grouping, mostly around the kind of music that is
prioritized and sort naming.
2023-06-15 12:58:10 -06:00
Weblate (bot)
f734268b40
Translations update from Hosted Weblate (#460)
* Translated using Weblate (Russian)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ru/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/uk/

* Translated using Weblate (Finnish)

Currently translated at 92.8% (258 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fi/

* Translated using Weblate (Finnish)

Currently translated at 96.8% (31 of 32 strings)

Translation: Auxio/Metadata
Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/fi/

* Translated using Weblate (Italian)

Currently translated at 98.5% (274 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/

* Translated using Weblate (Italian)

Currently translated at 99.2% (276 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/

* Translated using Weblate (Croatian)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hr/

* Translated using Weblate (Korean)

Currently translated at 100.0% (33 of 33 strings)

Translation: Auxio/Metadata
Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/ko/

* Translated using Weblate (Turkish)

Currently translated at 94.2% (262 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/

* Translated using Weblate (German)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/de/

* Translated using Weblate (French)

Currently translated at 97.1% (270 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/

* Translated using Weblate (Italian)

Currently translated at 99.2% (276 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/

* Translated using Weblate (Punjabi)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pa/

* Translated using Weblate (Punjabi)

Currently translated at 100.0% (33 of 33 strings)

Translation: Auxio/Metadata
Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/pa/

* Translated using Weblate (Hindi)

Currently translated at 100.0% (33 of 33 strings)

Translation: Auxio/Metadata
Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/hi/

* Translated using Weblate (French)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/

* Translated using Weblate (Italian)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/

* Translated using Weblate (Hindi)

Currently translated at 61.5% (171 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hi/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (278 of 278 strings)

Translation: Auxio/Strings
Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nl/

* Translated using Weblate (Croatian)

Currently translated at 100.0% (33 of 33 strings)

Translation: Auxio/Metadata
Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/hr/

---------

Co-authored-by: Макар Разин <makarrazin14@gmail.com>
Co-authored-by: BMT[UA] <weblate@yopmail.com>
Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Co-authored-by: atilluF <110931720+atilluF@users.noreply.github.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: Baki Nazik <voxrie@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: Issa1553 <fairfull.playing@gmail.com>
2023-06-15 17:10:53 +00:00
Alexander Capehart
31d647123f
music: use set for child information
Use sets for all child music information.

Unlike parent information, which usually has an ordering derived from
file information, child music information more or less doesn't, and
will be consistently re-interpreted by the app to apply user-configured
sorts.
2023-06-13 10:44:53 -06:00
Alexander Capehart
d22de34fd3
music: use sets for library information
Use a Set when storing all song, album, artist, and genre information.

These all have no consistent ordering due to parallelization, and
should be communicated as such.
2023-06-13 10:03:48 -06:00
Alexander Capehart
5b44c31689
music: sort song information
Sort song informtion in all MusicParent instances.

This is a temporary hack to band-aid music consistency between reloads,
as with the aggressive parallelization song order is no longer
consistent.
2023-06-13 09:37:18 -06:00
Alexander Capehart
530e427b79
music: improve library updates
Update library information in a synchronized block and then only
dispatch the update on the main thread.
2023-06-13 08:58:08 -06:00
Alexander Capehart
0771a75b5a
playback: ignore zeroed replaygain tags
Ignore ReplayGain adjustments that are just 0 dB.
2023-06-13 08:57:03 -06:00
Alexander Capehart
4ee20bc112
playback: fix regression regarding partial rgadj
Fix a regression where partial ReplayGain adjustments missing an album
or track component would not be indexed.

This was an oversight made when moving adjustments to the cache, as the
nullability model of ReplayGain adjustments changed.
2023-06-09 10:08:44 -06:00
Alexander Capehart
672c256b1e
music: group albums by raw artist keys
Properly group albums by raw artist keys, instead of by raw artist
instances.

This was an accidental regression in 3.1.1 that resulted in duplicate
albums in some circumstances.

Resolves #475.
2023-06-08 20:40:09 -06:00
Alexander Capehart
e848bea0bf
music: remove zero digit-likes from names
Remove all characters with a semantic meaning of "zero" from the start
of music names, at least when intelligent sorting is enabled.
2023-06-08 14:09:09 -06:00
Alexander Capehart
93d3e82140
ui: use targetstate more
Use targetState whenever making decisions on whether a certain sheet
state change is valid.

This is mostly for stylistic consistency and has no effect on UX.
2023-06-08 13:49:24 -06:00
Alexander Capehart
abe4255986
list: actually update playlist selections
Remove an incorrect change check resulting in the selection not
updating when playlist information changed.

Resolves #476.
2023-06-08 13:37:12 -06:00
Alexander Capehart
59280cc6d5
playback: standardize table names
Just let room pick the table names for PersistenceDatabase, instead of
using custom ones.

Reduces the amount of code in that part of the app.
2023-06-08 10:23:49 -06:00
Alexander Capehart
aaba858fcf
all: only use one fallback method for dbs
Only use fallbackToDestructiveMigration for all databases.

I thought you had to selectively enable downgrading as well, but
apparently that disables other destructive migrations. This was not
obvious at all and caused countless issues. Absolutely flooring.
2023-06-08 10:15:04 -06:00
Alexander Capehart
bce03a5833
playback: do not dynamically extract adjustments
Do not extract ReplayGain adjustments on the fly, instead doing them as
we go along.

This prevents an issue where the ReplayGain information would only be
applied a short period after playback start, which is heavily jarring.
2023-06-08 10:03:54 -06:00
Alexander Capehart
5ab46ba5d1
music: add userlibrary error returns
Make UserLibrary return some kind of error indicator if something
fails.

I don't have the framework for how the app will display these errors
just yet.
2023-06-07 20:10:07 -06:00
Alexander Capehart
a9a6d1ccc1
music: cleanup
Clean up parts of the music loader.
2023-06-07 20:08:57 -06:00
Alexander Capehart
77d01a0c97
home: use constant page limit
Use a constant page limit of 5 instead of a dynamic page limit.

This was not being properly updated prior, and since the ViewPager
already clamps it, the limit does not really need to be based on the
tab size anyway.
2023-06-07 20:07:06 -06:00
Alexander Capehart
8d97e86c8d
music: synchronize userlibrary value reads
Use synchronized when reading and writing values in UserLibrary.

Convention for all shared objects.
2023-06-07 19:40:31 -06:00
Alexander Capehart
07eefda67a
music: parallelize library creation
Make it so that the DeviceLibrary constructor streams all song
information instead of building the library on completion.

This has no measurable effect on loading times, but does appear visibly
faster to the user since the loading process is no longer stuck on the
"Loading your music library" step.
2023-06-07 19:32:22 -06:00
Alexander Capehart
8edfcd22c7
music: make grouping mechanism consistent
Actually bother to make the way music is grouped consistent, based on:
- The first track for albums
- The earliest album for artists
- The first song for genres
2023-06-07 15:15:51 -06:00
Alexander Capehart
927c4a056e
music: recognize (album)artistssort tags
Recognize albumartistssort and artistssort tags, which are apparently
written by beets.
2023-06-07 15:15:01 -06:00
Alexander Capehart
96874b3324
music: do not transfer cache db
Do not transfer the cache db between devices, drop it instead.

This is at best useless (timestamps and ids will be invalid) and at
worst actively detrimental (timestamps and ids are similar), so
better to reindex than try to read from the cache.

Resolves #467.
2023-06-07 09:43:17 -06:00
Alexander Capehart
55597e4976
ui: fix incorrectly aligned disc headers
Fix an issue where disc headers would be at the top when no subtitle as
available.

I really thought that TextView.text would be null if I set it to null.
Instead it becomes an empty string, breaking the visbility change. Fix
it by just using the disc value.

Resolves #472.
2023-06-07 09:23:16 -06:00
Alexander Capehart
6031fb2890
Merge pull request #465 from OxygenCobalt/dev
Version 3.1.1
2023-06-04 02:05:46 +00:00
Alexander Capehart
d49034b664
ui: fix back listener leak
Fix an issue where the OnBackPressedListeners would leak their bound
views once MainFragment's view was destroyed.
2023-06-03 09:24:45 -06:00
Alexander Capehart
736f3ec6b7
playback: fix crash on state restore
Fix a crash stemming from applying the playback state on the main
thread instead of the background thread.

all: add misc todos
2023-06-03 09:12:41 -06:00
Alexander Capehart
182883ef2d
music: avoid redundant devicelibrary comparison
Avoid redundantly comparing DeviceLibrary instances based on parent
information already derived from song instances.
2023-06-03 09:02:39 -06:00
Alexander Capehart
aae688b642
home: fix stuck playlist indicator
Fix an accidental return statement resulting in the playlist playback
indicator not properly updating if a song not in the playlist was
played.
2023-06-03 09:01:26 -06:00
Alexander Capehart
d786cd16d7
all: cleanup
Pre-release clean-up.
2023-06-02 17:25:59 -06:00
Alexander Capehart
c59074a4fe
build: bump to 3.1.1
Bump to version 3.1.1 (31).
2023-06-02 14:56:05 -06:00
Alexander Capehart
e150647573
playback: fix improper re-initializaiton
Fix issues stemming from how ExoPlayer apparently doesn't send a
playWhenReady event after being stopped.

This ended up breaking AudioEffect integration and notification
posting. I really don't know why player.stop() doesn't do this.
2023-06-02 14:47:14 -06:00
Alexander Capehart
e39d4d879c
ui: fix stuck sheet when playback ends
Fix an issue where the playback sheet will suddenly become "stuck" when
playback ends, preventing back navigation or playing new tracks.

This is, once again, caused by bottom sheet insanity. It does not
expose the target state of a sheet at all when it's settling, making
Auxio believe that it has to repeatedly "fix" the state of a hiding
playback sheet and leading to those aforementioned issues.

Fix this by band-aiding it with yet a n o t h e r bottom sheet behavior
extension that exposes the target state. This will be eventually be
used in the whole bottom sheet flow, as it allows me to abort
in-progress sheet transitions, but I'm not going to rock the boat like
this in a patch release. Probably 3.2.0.

Resolves #464.
2023-06-02 14:34:19 -06:00
Alexander Capehart
4581532928
queue: shift back if removing playing end
Shift the queue index backwards if the current song at the end of a
queue is removed.

Without this, the index becomes OOB and makes the queue be interpreted
as entirely empty when it actually isn't, which is compounded by a
remove-1 update intruction leading to a RecyclerView inconsistency
crash.
2023-06-02 13:34:00 -06:00
Alexander Capehart
df174e22f6
music: cache hashcode in data
Cache the hashcode of song/album/artist/genre information so that it
can be calculated easily later.
2023-06-01 20:46:56 -06:00
Alexander Capehart
0d28bdf99e
music: remove unnecessary documentation
Remove unnecessary function documentation for private methods in
DeviceLibrary.
2023-06-01 20:18:02 -06:00
Alexander Capehart
a37df594e7
music: fix song build bottleneck
Fix redundant separator parsing obliterating loading performance.

If there are no separators configured, the parsing function would not
short-circuit and instead do a useless O(n) iteraton (including
escaping!), massively reducing performance.

Song build performance still isn't the best (blame intelligent
sorting), but it's definitely better now.
2023-06-01 20:16:39 -06:00
Alexander Capehart
f9ccb831d8
music: fix comparison issues
Fix a few problems with the current comparison algorithm:
1. It wasn't actually comparing the raw music information, only the
UIDs, which was redundant.
2. The comparison in the main music loading process occurred on the
main thread, which causes massive freeze-up issues.

Resolves #457.
2023-06-01 15:10:24 -06:00
Alexander Capehart
46fb33de59
image: optimize grouping routine
Turns out the image grouping routine runs on the main thread and is
slow enough to cause massive freezing. Attempt to resolve this.
2023-06-01 12:39:19 -06:00
Alexander Capehart
5f70ce8870
build: drop api 21-23 support
Drop support for Lollipop and Marshmallow.

I legit cannot build for them anymore. There's some insane dependency
tangle between Kapt and Room that makes it impossible to use anything
BUT Java 17 (maybe Java 11). If I use Java 17 or Java 11, suddenly the
whole app crashes since Lollipop and Marshmallow only support some weird
Java 8/11 chimera abomination. This issue has persisted probably since
the move to Java 11, making it basically unusable anyway, so at this point
just cut the charade and officially drop support.
2023-06-01 10:52:44 -06:00
Alexander Capehart
5d51adfb0a
ui: split up back listeners
Split up the back gesture listeners into specific components.

These are still all used in MainFragment since I can't reliably set up
their priority correctly if they were used in their respective
fragments, but it should improve efficiency since most of these back
listeners don't need to be updated on every draw.
2023-05-30 17:10:32 -06:00
Alexander Capehart
841ea3620a
ui: fix incorrect back navigation
Fix the app incorrectly navigating away when a gesture accidentally
dragged one of the bottom sheets.
2023-05-29 11:50:44 -06:00
Alexander Capehart
40af4adc51
queue: use mdc drag handle
Use a real mdc drag handle on the queue sheet.

The accessibility functions won't even be enabled, but that
would need to be communicated in a special way anyway.
2023-05-29 10:38:49 -06:00
Alexander Capehart
d97eaf67b9
queue: fix visual error when adding to queue
Fix a visual error where adding to queue would visually place items
next to the starting index rather than at the end.

This was a result of forgetting to update the Add instructions returned
by Queue.addToNext to return the end of the queue rather than the
current index, which completely broke the queue visual.

Resolves #435.
2023-05-29 09:57:37 -06:00
Alexander Capehart
63f7627fbc
all: log listener additions
Log whenever a listener is added/removed.

This might make it easier to track concurrency issues stemming from
listener dispatch and addition occuring at the same time.
2023-05-29 09:24:06 -06:00
Alexander Capehart
bf40516ddd
build: update deps
ViewPager -> 1.1.0-beta02
Activity -> 1.7.2
2023-05-28 20:14:22 -06:00
Alexander Capehart
b93a512bf7
image: introduce sizing
Unify corner radius and icon size configurations under a new sizing
property. This is largely driven by a need to remove the typical
half-width icon sizing, as it results in blurry playing indicators
in some cases. This also co-incides with a change of parent image
icon sizes to 32dp over 28dp.

Resolves #415.
2023-05-28 20:00:52 -06:00
Alexander Capehart
47b791b95f
image: allow non-square album covers
Make the app UI properly handle album covers that are not 1:1, instead
of just cropping them.

This required switching to Coil's rounded corners transformation
outright so that the non-1:1 image can sit inside the CoverView in a
way that actually looks good

I'm pretty confident this will work, but there might be some edge cases
since coil's transformation is really finicky.

Resolves #355.
2023-05-28 19:05:42 -06:00
Alexander Capehart
770ae77eed
image: fix seam regression in coverview
Turns out that useless code from ImageGroup prevented a seam from
appearing when the playing indicator was shown. Re-add that,
albeit a bit less hacky.
2023-05-28 16:02:47 -06:00