Commit graph

1416 commits

Author SHA1 Message Date
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
1b19b698a1
settings: decouple
Decouple the settings god object into feature-specific settings.

This should make testing settings-dependent code much easier, as it no
longer requires a context.
2023-01-06 16:17:57 -07:00
Alexander Capehart
3502af33e7
music: add support for date-encoding years
Add support for date-encoding years such as "YYYYMMDD".

This is a semi-common timestamp edge-case, it seems, primarily due to
taggers wanting to encode date information in older tag formats.
2023-01-06 13:47:18 -07:00
Alexander Capehart
a29875b5bf
music: decouple library from musicstore/indexer
De-couple the library data structure (and library grouping) from
MusicStore and Indexer.

This should make library creation *much* easier to test.
2023-01-06 12:04:27 -07:00
Alexander Capehart
a5ea4af5c4
music: finish parsing tests
Finish ParsingUtil tests.
2023-01-05 20:08:12 -07:00
Alexander Capehart
782b570b38
music: add texttags tests
Add tests for the TextTags processing wrapper.
2023-01-05 14:24:30 -07:00
Alexander Capehart
502dd8ccc4
actions: add testing step
Add a testing command to the CI workflow.
2023-01-05 12:56:46 -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
78e3739a68
testing: add unit test framework
Add junit/espresso alongside a few basic tests.

I am nowhere near close to being "done" with this at all.
2023-01-05 12:27:37 -07:00
Alexander Capehart
a10cf1e0c3
music: fix enqueueing
Fix enqueuing issues encountered during testing.
2023-01-05 11:38:32 -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
c0f1b9423f
music: band-aid queue move issues
Band-aid certain types of queue moves that will fail to cauase the
index to correct. Just do this by assuming all queue moves are swaps
and then forgetting about it.

I'll need to figure out how to "properly" do this eventually.
2023-01-05 10:04:19 -07:00
Weblate (bot)
41dd9bf695
Translations update from Hosted Weblate (#308)
* 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.

* Translated using Weblate (Spanish)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Croatian)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 26.2% (64 of 244 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Russian)

Currently translated at 99.5% (243 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 51.6% (126 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 96.2% (26 of 27 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 70.9% (173 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 72.5% (177 of 244 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (27 of 27 strings)

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

Co-authored-by: Alexander Capehart <alex@oxycblt.org>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Vaclovas lntas <vaclovas1999@gmail.com>
Co-authored-by: Eric <hamburger2048@users.noreply.hosted.weblate.org>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: kirill blaze <kirillblaze2@gmail.com>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: Edmundo Nocchi <edmundonocchii@gmail.com>
Co-authored-by: santiago046 <comehere665@gmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: Alexander Capehart <oxycblt@abstractr.net>
2023-01-05 09:33:46 -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
16513e6547
playback: implement new queue system
Implement a new heap-based queue system into the app.

Unlike the prior queue, this one no longer keeps one canonical queue
and then simply swaps between shuffled and ordered queues by
re-grabbing the song list currently being played. Instead, the same
"heap" of songs is used throughout, with only the way they are
interpreted changing.

This enables a bunch of near functionality that would not be possible
with the prior queue system, but is also really unstable and needs a
lot more testing.

Currently this commit disables state saving at the moment. It will be
re-enabled when the new queue can be reliably restored.
2023-01-04 19:24:30 -07:00
Alexander Capehart
1b44eeae15
music: rename filesystem back into storage
Rename the filesystem module into storage.

Forgot about the MediaStore utils I had in there. The original name was
more correct.
2023-01-04 09:46:02 -07:00
Alexander Capehart
d55dfbc849
list: make listeners generic
Make all list listeners operate on generic values.

Wanted to do this for awhile, but couldn't figure out how to get the
listener to work with sub-typed listeners until I learned what the in
keyword actually does. This removes a ton of type-checking boilerplate
that it's not even funny.
2023-01-04 09:42:52 -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
3e33510139
Merge pull request #310 from OxygenCobalt/dev
Version 3.0.1
2023-01-03 19:01:31 -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
d8e24c4c47
all: use volatile in shared objects
Use volatile on all mutable shared object fields in an attempt to
reduce the amount of possible bugs stemming from caching.
2023-01-03 14:01:10 -07:00
Alexander Capehart
d4d3bd5ff4
detail: band-aid crashes when library unavailable
Band-aid a crash that would occur when the library is somehow
unavailable in the detail view. Now, if it's unavailable, the
app simple navigates away.

Not sure how this is happening, but I'd imagine it's some caching
shenanigans I need to fix by using volatile on any shared field.
2023-01-03 13:55:36 -07:00
Alexander Capehart
bd9c02a1e1
Merge branch 'dev' of github.com:OxygenCobalt/Auxio into dev 2023-01-02 19:06:17 -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
Weblate (bot)
fa357c3dab
Translations update from Hosted Weblate (#306)
* Translated using Weblate (Czech)

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (243 of 243 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (26 of 26 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (26 of 26 strings)

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

* Added translation using Weblate (Norwegian Bokmål)

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 96.1% (25 of 26 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (244 of 244 strings)

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

Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Enrico D'Ortenzio <enrico2588@gmail.com>
Co-authored-by: Eric <hamburger2048@users.noreply.hosted.weblate.org>
Co-authored-by: Vaclovas lntas <vaclovas1999@gmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2023-01-02 08:17:11 -07:00
Alexander Capehart
4db4b023d5
home: temporarily re-add no music case
I actually have no idea how to go about decoupling the other music
loading errors from the "No Music" case without a very jarring user
experience, so I'm not doing it for now.
2023-01-01 17:01:22 -07:00
Alexander Capehart
9ab729a069
detail: decouple detail song and properties
Decouple DetailSong into two fields for the current song and current
properties.

Combining them was a technical decision that no longer makes sense,
and separating them makes life much easier.
2023-01-01 17:00:51 -07:00
Alexander Capehart
b103eb4749
music: refactor indexer responses
Make indexer responses use Result instead of an arbitrary response
type.

This is part of a more general rework to move the "No music found"
screen from the home view to the individual home lists.
2023-01-01 13:54:56 -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
7721e64096
music: split off extractor parsing
Split off parsing-related components from extractor into a new parsing
module.

A lot of these methods are used in non-extractor code, so it makes more
sense for them to not be part of the extractors.

The code that is really extractor-specific can remain within the
extractor files.
2022-12-31 19:50:54 -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
f4aa20b2f1
actions: tweak workflow naming
Tweak the naming of workflow steps to be more consistent and clear.
2022-12-31 11:28:22 -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
bf56a50b59
all: refactor associating class naming
Standardize from/new companion method usage, Callback/Listener usage,
and companion object visibility across the app.
2022-12-30 19:26:09 -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
58e026e781
music: split off dates into separate file
Split off Dates and Date Ranges off into their own file.

The Music file was getting too big for it's own good, and the addition
of Date ranges makes splitting it off much easier.
2022-12-30 16:18:26 -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
4533251efd
info: make bug report log field mandatory
Sick and tired of people providing unhelpful bug reports without a
stack trace. This should force them to provide one.
2022-12-30 14:42:19 -07:00
Alexander Capehart
b0f38fc5db
actions: fix artifacts
Fix an inccorrectly specific build command and path for creating
artifacts.
2022-12-30 11:41:38 -07:00
Alexander Capehart
affe5c482b
all: reformat code 2022-12-30 11:39:28 -07:00
Alexander Capehart
00401430f7
actions: create ci workflow
Create a github actions workflow that automatically produces artifacts.
2022-12-30 11:39:22 -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
b7bc0a6206
Merge pull request #300 from OxygenCobalt/dev
Version 3.0.0
2022-12-30 08:27:04 -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
57ed102cda
music: move cache to storage
Move the music cache to the app storage.

This is actually long-term data, so it makes more sense to do app
storage where it's less likely to get mangled.
2022-12-29 19:29:46 -07:00
Alexander Capehart
d16fc2e446
queue: re-add adaptive divider visibility
Re-add the adaptive divider functionality that was accidentally removed prior.
2022-12-29 14:49:28 -07:00
Alexander Capehart
bda42c9762
info: use new issue forms
Use the new issue forms instead of issue templates.
2022-12-29 14:49:28 -07:00