Commit graph

1261 commits

Author SHA1 Message Date
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
94a74ebcf8
music: re-add escaped parsing
Re-add parsing by escaped separators.

Previously I removed it becaue the regex parsing was not being
cooperative. Turns out we really do have to write our own parser
code. Fun.
2022-09-25 15:02:08 -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
37f226ad2d
strings: fix translation insanity
Fix miscellanious translation insanity added by weblate.
2022-09-24 15:44:09 -06:00
Weblate (bot)
d1bd907b29
Translations update from Hosted Weblate (#238)
* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (221 of 221 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 95.8% (23 of 24 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (221 of 221 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (24 of 24 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (24 of 24 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (228 of 228 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (228 of 228 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (232 of 232 strings)

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

* Translated using Weblate (Croatian)

Currently translated at 100.0% (24 of 24 strings)

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

* Translated using Weblate (Croatian)

Currently translated at 100.0% (232 of 232 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (232 of 232 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (235 of 235 strings)

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

* Translated using Weblate (Croatian)

Currently translated at 100.0% (235 of 235 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (235 of 235 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (235 of 235 strings)

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

* Translated using Weblate (Polish)

Currently translated at 80.8% (190 of 235 strings)

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

* Translated using Weblate (Romanian)

Currently translated at 30.6% (72 of 235 strings)

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

* Translated using Weblate (Polish)

Currently translated at 81.7% (192 of 235 strings)

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

* Translated using Weblate (Polish)

Currently translated at 82.1% (193 of 235 strings)

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

* Translated using Weblate (Polish)

Currently translated at 100.0% (235 of 235 strings)

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

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (233 of 233 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (233 of 233 strings)

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

Co-authored-by: Clyde Johanson <johnson.hu95@gmail.com>
Co-authored-by: Enrico D'Ortenzio <enrico2588@gmail.com>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: Maciej Klupp <maciej.klupp@gmail.com>
Co-authored-by: Mozart Michael <michael.mozart@protonmail.com>
2022-09-24 21:39:58 +00: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
c3de8fe4fd
music: use plural vorbis artist tags
Use plural variants of vorbis artist/album artist tags.

Some people add these tags to signal the artist makeup of a song
when a player supports multiple artists while still allowing less
sophisticated players to operate with single-artist tags.
2022-09-24 09:14:31 -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
5c76838f69
build: upgrade deps
Upgrade the dependencies I can without breaking the app:
core -> 1.9.0
activity -> 1.6.0
fragment -> 1.5.3
nav -> 2.5.2
2022-09-23 10:35:16 -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
765f2f9a18
music: keep changes when unshuffling/reshuffling
Keep changes when unshuffling and reshuffling the queue.

This quirk was a hold-over from the old queue system, and now it's
removed.

Note that sorting is still based on parent, and so sort orders might
remain somewhat wonky. I only see myself really tackling that come
gapless playback, as I have to remove that last vestige to get that
system working.
2022-09-16 20:13:30 -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
717f49fc20
music: add picker dialog
Add a dialog for picking a genre from several choices.

This basically completes multi-genre support in Auxio, save more
internal reworks.

Note that it is extremely likely that the "Play from genre" setting
will be removed soon. This feature has made me realize that such does
not many any real sense, as genres are more semantically similar to
playlists than artists or albums. This implementation only exists to
make multi-artist support an easy plug-and-play operation.

Resolves #201
2022-09-14 19:59:12 -06:00
Alexander Capehart
2aa540c29a
ui: make setting dialogs
Make the setting dialogs navigation destinations.

This reduces the boilerplate required for dialogs.
2022-09-14 18:54:07 -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
780e0dce06
music: add separator setting dialog
Add a dialog for the new separators setting.
2022-09-13 11:07:44 -06:00
Alexander Capehart
cdd4d5ebcd
music: make uids use music mode
Make UID structure dependent on the music mode.

This involves replacing the "tag" value with more structured fields and
appending the int code of the music mode to the UUID rather than making
it part of the UID's "tag". UIDs aren't quite a UUID, so this is
allowed.
2022-09-10 20:31:56 -06:00
Alexander Capehart
c342fb364b
all: merge display and playback modes
Merge DisplayMode and PlaybackMode into a new class called MusicMode.

Both of these datatypes represented similar things, and thus it's much
easier to make them the same datatype. Moreover, it makes the
forthcoming addition of the music selector much easier if the same
datatype was tied to the representation of music.

This commit also moves around things around the project to be slightly
more coherent.
2022-09-10 19:39:29 -06:00
Alexander Capehart
8aac87e02c
music: take size into account when opening by uri
Also take the size of the music file into account when it is being
played.

This way, we could remove some situations where two files with the
same name get confused with eachother when opened.
2022-09-10 10:50:44 -06:00
Weblate (bot)
e15eb4547d
Translations update from Hosted Weblate (#228)
* Translated using Weblate (German)

Currently translated at 100.0% (223 of 223 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (24 of 24 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (24 of 24 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 69.9% (156 of 223 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 70.8% (158 of 223 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 77.5% (173 of 223 strings)

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

* Translated using Weblate (Polish)

Currently translated at 23.7% (53 of 223 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 73.3% (162 of 221 strings)

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

* Translated using Weblate (Polish)

Currently translated at 53.3% (118 of 221 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 74.6% (165 of 221 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 78.7% (174 of 221 strings)

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

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 80.5% (178 of 221 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 95.8% (23 of 24 strings)

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

Co-authored-by: Konstantin <konstantin.tutsch@disroot.org>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Vaclovas lntas <vaclovas1999@gmail.com>
Co-authored-by: Maciej Klupp <maciej.klupp@gmail.com>
Co-authored-by: metezd <itoldyouthat@protonmail.com>
Co-authored-by: LUIS PAULO BRAMBILLA <luispaulobrambilla@gmail.com>
2022-09-10 16:45:24 +00: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
855331aafa
system: update indexing notif every few seconds
Instead of updating the notif every 50 songs, update it every 1.5s.

This is in preparation for automatic reloading, which will once again
make Indexed song updates EXTREMELY fast and would thus rate-limit the
notification if the previous system was used.
2022-09-09 20:46:25 -06:00
Alexander Capehart
78201e55ee
all: phase out taskguard
Phase out the dumb hack TaskGuard class in favor of yield.

For some reason, I was under the impression that yield was horribly
slow. It's not, I was just using it wrong. So now TaskGuard is no
longer needed.
2022-09-09 20:42:03 -06:00
Alexander Capehart
189f712eaa
music: re-add mediastore genre parsing
Re-add MediaStore genre parsing to the init() step.

This time, to play along with the new abstraction, the query is done in
initialization and loaded into a map that is then used when populating
raw audio.
2022-09-09 20:01:05 -06:00
Alexander Capehart
06d6495dcd
all: lint with ktlint
Just lint with ktlint. It has better import checking functionality.
2022-09-08 21:55:05 -06:00
Alexander Capehart
09823d7829
all: reformat code
Simultaniously reformat code using ktlint and ktfmt.
2022-09-08 21:04:51 -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
2e71342e1c
music: move utils around
Move some miscellanious utils around.
2022-09-08 19:01:21 -06:00
Alexander Capehart
4c954e83b0
music: add basic framework for separators
Add a basic framework for user-customizeable separators.

This is designed to be extendable if needed, albeit the app will likely
only let the user choose between +, ;, /, &, and ,.
2022-09-08 18:17:04 -06:00
Alexander Capehart
574224ff99
music: update comments
Update comments in ParsingUtil.
2022-09-07 22:13:18 -06:00
Alexander Capehart
81ca021ce7
music: refactor separator parsing
Add separator parsing back, albeit in a much different manner.

Now Auxio will try to parse by , ; / + and &. This will be disabled by
default in the future and available as a setting. When parsing by
separator, whitespace is also trimmed. This occurs nowhere else though,
as there is no demand.
2022-09-07 22:02:56 -06:00
Alexander Capehart
2033e2cb1f
music: add support for id3v2.4 multi value tags
Add support for ID3v2.4-style multi-value tags separated by a null
terminator.

This temporarily removes most other forms of separator parsing in the
app. My plan is to reunify it under a new separator setting that allows
the user to select how multi-value tags are separated in their library.
Separator parsing tends to be too destructive by default, so this tends
to be a good option overall.

This commit does require ExoPlayer to be forked once again to add
ID3v2.4 separator support.
2022-09-07 21:00:24 -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
e5d7cdc340
playback: migrate to reactive model
Migrate the playback system to a reactive model where internalPlayer
is now the complete source of truth for the playback state.

This removes the observer pattern for positions and instead introduces
a new State datatype that allows consumers to reactively calculate
where the position probably is.

This is actually really great for efficiency and state coherency, and
is really what I was trying to aim for with previous (failed) reworks
to the playback system. There's probably some bugs, but way less than
the ground-up rewrites I tried before.

This also lays the groundwork for gapless playback, as the internal
player framework is now completely capable of having more functionality
borged into it.
2022-09-06 11:45:23 -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
b24e22182e
music: add basic multi-genre support [#201]
Add basic support for multiple genres.

This is sort of the test run for full multi-artist support, allowing me
to rework my abstractions to handle the presence of multiple parents.

This is nowhere near complete. For example, there is currently a stopgap
measure in the playback system that basically breaks genre playback.
It's a start though.
2022-09-03 16:46:53 -06:00
Alexander Capehart
022f92f27f
music: restructure around raw objects
Restructure music data around a series of "raw" objects that better
hide the internal information needed to properly construct the library.
2022-09-03 14:28:06 -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
cf23a14494
info: update icon
Update the app icon to be fully square, and let clients round it
instead.
2022-09-03 12:43:00 -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
3ce75f04df
Merge branch 'dev' of github.com:OxygenCobalt/Auxio into dev 2022-09-02 21:44:39 -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
9b50b3cbf7
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:43:39 -06:00
Alexander Capehart
8a70ece442
recycler: fix fast scroll issues
Fix issues with the fast scroller, such as an improper thumb position
and strange item behavior stemming from dataset changes.
2022-09-02 20:13:47 -06:00
Alexander Capehart
a8e6ccf031
ui: add dialog view holder
Add a special ViewHolder class for dialogs.

This just automates a hack I use to get full-size viewholders in
dialogs.
2022-09-02 19:40:50 -06:00