Commit graph

2708 commits

Author SHA1 Message Date
Alexander Capehart
f9857355bb
Revert "build: enable proguard obsfucation"
The crash screen fell though, so this makes no sense now.

This reverts commit 2cd6d93d45.
2023-02-20 15:07:09 -07:00
Alexander Capehart
6896ab912c
music: add subtitle to cache
Add subtitle tags to the music cache.

Didn't add these prior.
2023-02-19 22:02:55 -07:00
Alexander Capehart
975f239b8b
detail: add metadata to song detail view
Add metadata items to the song detail view. Should provide a useful
view into how Auxio is interpreting song metadata.

Resolves #330.
2023-02-19 21:59:58 -07:00
Alexander Capehart
bb704ea3fd
music: fix broken audio info extraction
Fix an issue where audio info extraction would break if done
consequtively.

Accidentally released a global state instance of the extractor. Now
that it's a local instance, the issue should not occur.
2023-02-19 13:11:54 -07:00
Alexander Capehart
192b917904
music: actually remove dependence on dcoders
Actually remove dependence on the non-audio decoders in the music
(and image) modules.
2023-02-19 13:08:44 -07:00
Alexander Capehart
e515534023
deps: fix stripping of ffmpeg extension
Fix an issue where stripping of the FFMpeg extension would not occur,
as AGP would try to default to an entirely different NDK version.

Eventually I'm considering just vendoring the FFMpeg extension outright
once I can upstream some of the ExoPlayer patches.
2023-02-19 12:04:15 -07:00
Alexander Capehart
2cd6d93d45
build: enable proguard obsfucation
Honestly the app is getting far too large for me to not obfucate on
morals. The source is available, it's fine.
2023-02-19 11:03:34 -07:00
Alexander Capehart
8b6545ca10
playback: specify audio extractors only
Only specify audio extractors to reduce APK size.
2023-02-19 10:59:28 -07:00
Alexander Capehart
458f2a5d84
deps: upgrade deps
ExoPlayer -> 2.18.3
Dagger -> 2.45
Coil -> 2.2.2
AGP -> 7.4.1
Gradle -> 8.0
2023-02-19 10:24:54 -07:00
Alexander Capehart
512474d7ab
deps: pull exoplayer
Pull new exoplayer commits.
2023-02-14 20:52:40 -07:00
Alexander Capehart
a791b43b2f
modules: depend exoplayer on a specific commit
Depend exoplayer on a commit instead of a branch.

Should make builds more reproducible.
2023-02-14 20:50:33 -07:00
Alexander Capehart
9b7494798a
deps: delegate ndk to ffmpeg ext
Delegate the NDK to the FFMpeg extension.

Should finally make this usable with github actions.
2023-02-14 20:44:16 -07:00
Alexander Capehart
efe03cac8c
actions: try to fix workflow
Try to fix workflow to no avail. Will need to do more testing later.
2023-02-13 22:27:07 -07:00
Alexander Capehart
399942e7e5
deps: move exoplayer build into gradle/submodules
Move the ExoPlayer build process into gradle by leveraging some shell
scripting and submodule magic.

This more or less kills all windows compatibility, but that is fine.
Who even develops on windows?
2023-02-13 21:40:17 -07:00
Weblate (bot)
556c1cf43b
Translations update from Hosted Weblate (#352)
* Added translation using Weblate (Punjabi)

* Translated using Weblate (Hindi)

Currently translated at 16.7% (43 of 257 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 99.2% (255 of 257 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Japanese)

Currently translated at 89.4% (230 of 257 strings)

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

* Translated using Weblate (Punjabi)

Currently translated at 33.8% (87 of 257 strings)

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

* Translated using Weblate (German)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Polish)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Romanian)

Currently translated at 45.9% (118 of 257 strings)

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

* Translated using Weblate (Russian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Punjabi)

Currently translated at 35.7% (92 of 257 strings)

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

* Translated using Weblate (Japanese)

Currently translated at 96.4% (27 of 28 strings)

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

* Added translation using Weblate (Belarusian)

* Translated using Weblate (Belarusian)

Currently translated at 98.4% (253 of 257 strings)

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

---------

Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: metezd <itoldyouthat@protonmail.com>
Co-authored-by: Skrripy <rozihrash.ya6w7@simplelogin.com>
Co-authored-by: SakiNSA <legit@mail.ee>
Co-authored-by: Макар Разин <makarrazin14@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2023-02-13 12:01:43 -07:00
Alexander Capehart
d0b2fb8517
music: simplify tag extraction spin
Simplify the tag extraction loop to not depend on the co-routine
primitives.

This actually makes the music loading process a bit faster since the
loop isn't as tight.
2023-02-13 09:23:58 -07:00
Alexander Capehart
213409924b
playback: switch to ffmpeg extension
Switch to the FFMpeg ExoPlayer extension, which should enable support
for ALAC while also retaining support for FLAC below Android 8.
2023-02-13 09:06:45 -07:00
Alexander Capehart
c9ddda2ebd
home: fix visual clipping on shuffle fab shadow
Fix visual clipping on the shuffle FAB's shadow.

Turns out padding, while slower, is actually the better inset handling
method, as it allows me to avoid visual clipping in some cases.
2023-02-12 21:53:34 -07:00
Alexander Capehart
1826ae3215
deps: update to mdc 1.8.0-alpha01
FINALLY update to MDC 1.7.0. After over half a year.

I have been continually blocked by doing this due to this absurd ripple
bug that was so continually frustrating. Today, I finally figred out
how to hack a fix in by using R E F L E C T I O N and manually
disabling the bugged code path since google apparently can't be bothered
to fix it.

Now, you might wonder why I didn't update to 1.8.0. That is because
there is ANOTHER RIPPLE BUG. THIS TIME WITH THE TAB LAYOUT. AND ONLY IF
IT'S IN A COLLAPSING TOOLBAR LAYOUT. Can't wait to finally use the new
1.8.0 features in December!
2023-02-12 21:45:47 -07:00
Alexander Capehart
bc96c761a0
music: remove stray real naming
Replace stray Real* class names and replace them with the new Impl
naming scheme.
2023-02-12 19:18:14 -07:00
Alexander Capehart
e017d53139
all: inject room dbs
Inject room databases instead of lazily creating them.

This should make repositories much easier to test.
2023-02-12 19:15:11 -07:00
Alexander Capehart
dd2017c510
image: use di w/coil
Use dependency injection with Coil.

This allows me to use the coil-base artifact which should remove a bit
of superfluous dexcode, assuming dagger uses less. It probably doesn't.
2023-02-12 19:07:00 -07:00
Alexander Capehart
63e5a7ee69
playback: fully use di
Fully use DI in the playback module.

Previously use was split among different components that could leverage
injection, and components that could not. This fully unifies them.
2023-02-12 18:50:33 -07:00
Alexander Capehart
9f74fe8a20
image: add proper constructor to settings
Add proper @Inject constructors to ImageSettings.
2023-02-11 16:39:46 -07:00
Alexander Capehart
62bf532e21
music: fall back to txxx:releasetype on id3v2
Fall back to TXXX:RELEASETYPE on ID3v2 if the more conventional
MusicBrainz tag cannot be found.

This should reduce confusion for people that might assume that the
vorbis convention for release types also applies to ID3v2.

Resolves #353.
2023-02-11 16:37:35 -07:00
Alexander Capehart
833ddceba4
all: use binds di
Use @Binds more heavily with dependency injection, whee currently
reasonable.

Reduces the amount of boilerplate "fun from" functions that need to be
used.
2023-02-11 16:29:47 -07:00
Alexander Capehart
6e55801513
music: make extractors injectable
Refactor the music module to make each individual extractor able to be
injected directly.
2023-02-11 14:47:32 -07:00
Weblate (bot)
ae0c68c273
Translations update from Hosted Weblate (#336)
* 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 (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 (Portuguese (Brazil))

Currently translated at 100.0% (256 of 256 strings)

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

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

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Russian)

Currently translated at 99.6% (255 of 256 strings)

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

* Translated using Weblate (Italian)

Currently translated at 100.0% (28 of 28 strings)

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

* Translated using Weblate (Indonesian)

Currently translated at 70.3% (180 of 256 strings)

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

* Translated using Weblate (Korean)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Polish)

Currently translated at 100.0% (256 of 256 strings)

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

* Translated using Weblate (Russian)

Currently translated at 100.0% (256 of 256 strings)

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

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

Currently translated at 100.0% (28 of 28 strings)

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

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

Currently translated at 14.4% (37 of 256 strings)

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

* Translated using Weblate (Malayalam)

Currently translated at 30.4% (78 of 256 strings)

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

* Translated using Weblate (Malayalam)

Currently translated at 96.4% (27 of 28 strings)

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

* Translated using Weblate (Czech)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Korean)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Russian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (257 of 257 strings)

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

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (28 of 28 strings)

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

---------

Co-authored-by: min7-i <postly+github_min@mailbox.org>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: Edmundo Nocchi <edmundonocchii@gmail.com>
Co-authored-by: atilluF <atilluF@users.noreply.hosted.weblate.org>
Co-authored-by: Evgeniy Khramov <thejenjagamertjg@gmail.com>
Co-authored-by: liimee <alt3753.7@gmail.com>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: Ilya <kilimov25@gmail.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: Raman <translations.0l5zc@simplelogin.com>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Skrripy <rozihrash.ya6w7@simplelogin.com>
Co-authored-by: Eric <hamburger2048@users.noreply.hosted.weblate.org>
Co-authored-by: Vaclovas lntas <vaclovas1999@gmail.com>
2023-02-05 16:19:26 -07:00
Alexander Capehart
3c211a1d17
list: make sorting direction explicit
Make sorting direction (ascending/descending) explicit in the UI and in
the code.

Instead of a boolean flag, two distinct "ascending" and "descending"
options are used instead. This should be much clearer.
2023-02-02 21:44:15 -07:00
Alexander Capehart
8536c3da31
all: start injecting shared objects
Start injecting shared object instances.

This is not a 100% conversion, as certain portions of the code are not
really ready for 100% DI constructors just yet.
2023-02-02 20:55:36 -07:00
Alexander Capehart
2a3e81889b
music: split off raw music from real music
Split off "raw" music (RawSong, RawAlbum) from real music impls
(RealSong, RealAlbum).

They don't really make sense as a sub-class anymore given that there is
no longer a canonical music datastructure.
2023-02-02 20:37:50 -07:00
Alexander Capehart
4afe91e4e8
music: fix threading problems
Fix issues with the current threading approach with the new parallel
music loader.
2023-02-02 20:19:12 -07:00
Alexander Capehart
1df1d40408
music: parallelize loading
Parallelize music loading.

- Queries over Media DB and Cache are ran parallel
- MediaStoreExtractor can now continue extracting songs independent
of MetadataExtractor's task pool capacity
- Library and Cache are saved in parallel

Resolves #343.

This should result in some pretty signifigant performance gains
due to the operations now being ran in parallel instead of
sequentially.
2023-02-02 19:54:58 -07:00
Alexander Capehart
78229f4794
music: fix failing tests
Fix failing tests stemming from incorrect module locations.
2023-01-29 20:41:05 -07:00
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