Commit graph

1451 commits

Author SHA1 Message Date
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
Markus Ebner
d0f9b049de
Implement bluetooth autospawn / autoplayback feature #235 2022-09-08 18:16:41 +02: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
Alexander Capehart
be8623ad2d
recycler: add span size abstraction to adapter
Make adapter instances handle span sizes.

This supercedes the hackier solution where the fragments would have to
reference adapter data in order to determine span size. Not anymore.
2022-09-02 13:36:43 -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
227a258eca
search: add playing indicators [#218]
Add playing indicators to the search view too.
2022-09-01 19:51:07 -06:00
Alexander Capehart
87ca4c8ab1
home: indicate playback on items [#218]
Indicate playback in the home view as well.

This is mostly a QoL change. Might also add this to the search view.
2022-09-01 19:27:36 -06:00
Alexander Capehart
5f6cdad507
util: remove logEOrThrow
Remove logEOrThrow from the logging framework.

Better to error than silently not doing anything.
2022-09-01 18:40:00 -06:00
Alexander Capehart
9d58076a0a
recycler: unwind abstractions
Unwind the RecyclerView abstractions.

The framework was far too suffocating and prevented the addition of
new changes. Remove it.
2022-09-01 18:27:37 -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
2bec9ce977
queue: add fast scroller
Add a fast scroller to the queue view.

This is actually easy to implement without disruption. Now the detail
view is the only view without such a fast scroller, as it needs more
reworks for it to be feasible.
2022-08-29 20:38: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
1ed6d75121
home: make thumb visible if provider is found
Make the thumb visible if a popup provider is found later.

Fixes an issue where the fast scroll thumb would only be visible
sometimes in the home view.
2022-08-29 09:40:55 -06:00