Commit graph

1824 commits

Author SHA1 Message Date
Alexander Capehart
138a2c3c1c
all: remove dependence on androidviewmodel
Entirely remove dependence on AndroidViewModel, replacing it with
dependency injection.
2023-01-29 20:38:01 -07:00
Alexander Capehart
ccbd77918b
all: add di framework
Add dagger/hilt dependency injection.

Does nothing right now, will actually add modules later.
2023-01-29 19:55:53 -07:00
Alexander Capehart
09d4dfc990
ui: make generic fragment viewmodels abstract
Turns out hilt doesn't like generic fragments. Move out all required
viewmodels to other places.
2023-01-29 19:44:21 -07:00
Alexander Capehart
7b0e502761
music: fix broken equality
Fix broken MusicParent equality that failed to properly compare types.
2023-01-29 19:35:06 -07:00
Alexander Capehart
4012c35cf4
all: fix db memory leak
Fix an issue where the database instances would leak memory due to an
incorrect context use.
2023-01-29 19:22:31 -07:00
Alexander Capehart
2413edfd5e
deps: update to java 11
Update to Java 11 instead of Java 8.

Seems to work fine.
2023-01-29 17:58:41 -07:00
Alexander Capehart
f8d1a880d4
all: post-refactor cleanup 2023-01-29 17:45:51 -07:00
Alexander Capehart
bfb1033ed7
music: hide data impls
Hide the implementation of Song, Album, Artist, and Genre.

This should make most of the app signifigantly easier to test.
2023-01-29 17:32:11 -07:00
Alexander Capehart
41bc6f9dfc
music: hide indexer impl
Hide the implementation of Indexer behind an interface.

This is in preparation for dependency injection.
2023-01-29 16:10:51 -07:00
Alexander Capehart
b34e6fdc8a
music: hide musicstore impl
Hide the MusicStore implementation behind an interface, transforming it
into a new MusicRepository class.

This is in preparation for dependency injection.
2023-01-29 15:57:46 -07:00
Alexander Capehart
bb2ea9df27
playback: hide playbackstatemanaager impl
Make PlaybackStateManager an interface instead of a direct
implementation.

Part of a rework to implement dependency injection in-app.
2023-01-29 15:46:41 -07:00
Alexander Capehart
c655f7d39e
playback: fix non-functioning repeat all mode
Fix an issue where the "repeat all" mode would not actually start
playing when the queue looped.
2023-01-23 21:27:49 -07:00
Alexander Capehart
d2f74fd138
music: switch cache to room
Make the cache extractors rely on a Room database as well.

I'm not quite sure how, but this also actually resulted in a huge speed
improvement.
2023-01-23 15:10:30 -07:00
Alexander Capehart
f27215a4be
playback: use room for persistence
Finally give up and use Room to persist the playback state.

This should make dependency injection much easier, and the
implementation isn't exactly the *worst*, as I was already using
"raw" data structures for the old queue database.
2023-01-23 12:45:55 -07:00
Alexander Capehart
fb004a9e8b
settings: move impls out
Move settings implementations out of the class so that they are easier
to manage.
2023-01-23 10:18:44 -07:00
Alexander Capehart
866d20f6eb
search: remove obsolete divider code
How did this even get here???
2023-01-23 09:12:22 -07:00
Alexander Capehart
a6f2d82107
detail: split off song property extraction
Split off the song property extraction code into a music package class.

This is part of an initiative to remove non-parameter uses of contexts
in ViewModels.
2023-01-23 09:06:20 -07:00
Alexander Capehart
6c604a9aa5
search: split off search algorithm from viewmodel
Split off the search algorithm from the ViewModel into a separate
object.

Part of an initiative to eliminate all non-parameter usage of contexts
in ViewModels.
2023-01-23 08:44:48 -07:00
Alexander Capehart
26f0fb7aba
detail: add support for disc subtittles
Add support for disc subtitle information

This allows disc groups to become named, which is useful for certain
multi-part albums.

Resolves #331.
2023-01-21 17:23:09 -07:00
Alexander Capehart
82a64b5e17
music: accept zero positions with non-zero totals
Accept positions that are zeroed, but only if there are non-zero total
values as well.

Sometimes zeroed positions are deliberate, but other times they are
placeholders meant to indicate a lack of a position. To resolve this,
Auxio now considers zeroed track/disc numbers in the presence of
non-zero track/disc numbers to be valid.
2023-01-21 16:49:17 -07:00
Alexander Capehart
240b4d6b2a
Merge pull request #334 from OxygenCobalt/dev
Version 3.0.2
2023-01-21 23:12:03 +00:00
Alexander Capehart
691eed344e
release: bump to 3.0.2
Bump the app version to 3.0.2 (26).
2023-01-21 16:03:30 -07:00
Alexander Capehart
90843918d6
settings: use manual nav graph
Manually use our own navigation graph in the new settings view.

This avoids a crash that occurs with the default preferences navigation
(on some devices) where the differing app IDs between debug and release
makes it so that the fragments cannot be found. Because you know.
Android.
2023-01-20 18:38:10 -07:00
Alexander Capehart
f2d44b40bf
info: note playback state wipe in 3.0.2
Indicate that the playback state will be wiped in 3.0.2 due to the new
queue system.
2023-01-20 15:37:48 -07:00
Alexander Capehart
900bcd142e
list: disable complex diffing for now
Disable the new instructions-based system for now.

The way I was doing reflection was likely far too unsafe and prone to
bugs. I'll want to do it some other way.
2023-01-20 15:16:04 -07:00
Weblate (bot)
8e9a22ccf3
Translations update from Hosted Weblate (#328)
* 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 (Korean)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Russian)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (Korean)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (245 of 245 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (German)

Currently translated at 99.6% (255 of 256 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Italian)

Currently translated at 97.6% (250 of 256 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (256 of 256 strings)

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

* 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/

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: kirill blaze <kirillblaze2@gmail.com>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Eric <hamburger2048@users.noreply.hosted.weblate.org>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: Alessandro <alessandro.cocco@outlook.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: Vaclovas lntas <vaclovas1999@gmail.com>
2023-01-20 03:02:33 +00:00
Alexander Capehart
34653425ee
detail: fix unintended code change 2023-01-19 19:56:14 -07:00
Alexander Capehart
28bb4e61c4
detail: fix crash when playing genre song
Fix an issue where the genre detail view would crash when playing a
song.
2023-01-19 19:53:33 -07:00
Alexander Capehart
b7726607ff
music: re-add song de-duplication
Re-add song deduplication, which apparently was lost at some point in
3.0.0's development cycle.
2023-01-19 07:39:32 -07:00
Alexander Capehart
018e2ef310
playback: fix nonfunctional notif action setting
Fix an issue where the playback notification would not update afer the
setting changes...again.
2023-01-18 17:24:11 -07:00
Alexander Capehart
a5971cbccd
music: bump cache db version
Fixed several issues regarding music loading between 3.0.0 and 3.1.0,
should update the cache so that I don't get stale complaints.
2023-01-18 16:49:26 -07:00
Alexander Capehart
0c69a35e80
detail: diff instead of replace when resorting
Completely rework the detail list implementations so that resorting the
song list causes a replace operation instead of a diff operation.

This finally makes the list experience consistent across the app.
2023-01-18 16:47:50 -07:00
Alexander Capehart
f7bf12c4a5
widget: fix round mode issue
Fix a problem where round mode would not round the widget bar, as it
normally would.
2023-01-17 15:07:37 -07:00
Alexander Capehart
2c2b560195
settings: redocument 2023-01-17 15:06:16 -07:00
Alexander Capehart
0f265cc2a4
settings: fix incorrect divider use
Fix incorrect divider setups in the settings UI.
2023-01-17 14:55:54 -07:00
Alexander Capehart
9e1f6af21e
list: switch to header divider
Switch to item decorations to manage header dividers.

This is much more reliable than encoding it in-data. Only cost comes in
that it forces me to backport yet another component since I still can't
update MDC after over half a year.
2023-01-17 14:37:33 -07:00
Alexander Capehart
fb93b82b2b
ui: redesign headers
Redesign the header component to be more aligned with M3 guidelines.

This includes moving the divider to the top when reasonable, using a
smaller font size, and using a tinted coloration to separate itself
from the list contents.
2023-01-16 19:35:16 -07:00
Alexander Capehart
ad9d2f2d9e
list: move instructions into recycler
Move the instructions enum (which is only concerned with recyclerview
semantics) into the list.recycler module instead of list.
2023-01-16 17:47:07 -07:00
Alexander Capehart
d38da9b892
list: make list instructions generic
Make list instructions generic in preparation for the detail list
update.

Detail views need their own instructions datatype, so this is meant to
allow that to be implemented without issue.
2023-01-16 17:45:03 -07:00
Alexander Capehart
4a7bc4e511
settings: split up ui
Split up the settings ui into four categories.

This should reduce the visual load on the user as Auxio continues to
accrue possible configuration options.

Resolves #323.
2023-01-16 16:14:51 -07:00
Alexander Capehart
e7ff7293c0
home: replace list only when resorting
Leverage the new UpdateInstructions system to allow the home view to
diff the lists on music updates, and then replace the lists on
resorting events.

This just improves quality-of-life overall.
2023-01-16 11:20:19 -07:00
Alexander Capehart
6e02929982
music: reorganize music folders dialog
Reorganize the music folders dialog to be more visually straightforward
than prior, primarily by grouping the folder elements into the same
visual region.

Resolves #318.
2023-01-16 10:18:55 -07:00
Alexander Capehart
a0aaec98d0
music: extend non-standard artists to id3v2
Just pre-emptively add support for TXXX variations of the non-standard
vorbis artist fields to the ID3v2 parser.

I'd imagine the naming convention will be similar between them, so why
not.
2023-01-16 09:33:20 -07:00
Alexander Capehart
bfbf805adc
list: remove synclistdiffer
Forgot to remove this now useless class.
2023-01-15 20:32:46 -07:00
Alexander Capehart
df98bb535f
list: rework diffing abstraction
Make all adapters relying on diffing unified into a DiffAdapter
superclass that can then accurately respond to the new
UpdateInstructions data.

UpdateInstructions is still not fully used everywhere, but will be
soon.
2023-01-15 20:31:50 -07:00
Weblate (bot)
b524beb0ac
Translations update from Hosted Weblate (#315)
* 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 (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 (Chinese (Traditional))

Currently translated at 22.9% (56 of 244 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 68.4% (167 of 244 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 100.0% (27 of 27 strings)

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

* Translated using Weblate (Chinese (Traditional))

Currently translated at 96.2% (26 of 27 strings)

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

* 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 (Turkish)

Currently translated at 70.0% (171 of 244 strings)

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

* Translated using Weblate (Portuguese (Portugal))

Currently translated at 99.5% (243 of 244 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 100.0% (244 of 244 strings)

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

* Translated using Weblate (French)

Currently translated at 52.8% (129 of 244 strings)

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

* Translated using Weblate (French)

Currently translated at 96.2% (26 of 27 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (244 of 244 strings)

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

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: p4ssen <244045932@qq.com>
Co-authored-by: Bai <batuhanakkurt000@gmail.com>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: metezd <itoldyouthat@protonmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: Ömer Faruk Çakmak <omerfarukckmk@protonmail.com>
Co-authored-by: Max Vyr <maxvy@proton.me>
Co-authored-by: Translator-3000 <weblate.m1d0h@8shield.net>
2023-01-15 03:58:20 +00:00
Alexander Capehart
5f9169fb78
music: add non-standard artist fields
Add non-standard ARTISTS/ALBUMARTIST fields to reasonable places in the
ID3v2 and Vorbis parsers.

Turns out these are stupidly common when multi-artist information is
used in order to maximize player compatibility. More or less, TPE1 and
ARTIST will be filled in with delimited values, while ARTISTS will be
filled in with native multi-value information.

This is stupid and insane, but I want to prioritize a good out of box
experience without much user fiddling, so I may as well implement
these.

Currently, I'm only adding the non-standard fields that I know exist.
This doesn't include hypothetical but unencountered fields like
TXXX:ALBUMARTISTS.
2023-01-14 20:52:43 -07:00
Alexander Capehart
176f0cc465
list: add update instructions framework
Add the basic framework that should allow for different types of list
updates in different situations.
2023-01-14 19:55:09 -07:00
Alexander Capehart
5988908b56
playback: add ability to play/shuffle selection
Add the ability to play or shuffle a selection.

This finally allows "arbitrary" playback to be created from any
combination of songs/albums/artist/genres, rather than just from
pre-defined options.

Resolves #313.
2023-01-10 08:12:47 -07:00
Alexander Capehart
692839e8fe
playback: re-add state persistence
Re-add state persistence with support for the new queue.

This should finally finish the new queue system.
2023-01-09 13:53:37 -07:00