Commit Graph
100 Commits
Author SHA1 Message Date
Alexander Capehart 480b1b28e5 music: display correct message on new playlist
The context of the "New Playlist" dialog can differ depending on the
action performed, such as adding to a playlist or importing a playlist.
We need to make sure we're still showing the right message once this
is done.
2023-12-24 11:34:55 -07:00
Alexander Capehart c5a3f72b99 music: add more playlist messages
Add more types of playlist messages corresponding to other actions, so
they can be indicated in the UI only when the process is complete.

This is somewhat incomplete. It does not include indicating errors for
other playlist operations (Which I want to do), and neither does it
handle situations in which some playlist operations and up reducing
to others (i.e import -> create). I need to do that later.
2023-12-23 22:02:55 -07:00
Alexander Capehart 21970349cc music: add ability to import into playlists
Add a menu option that allows you to import a playlist file into an
existing playlist.

This is useful for keeping Auxio playlists up to date with a remote
source.
2023-12-23 20:50:40 -07:00
Alexander Capehart c9b1ab9068 all: reformat xml 2023-12-23 20:01:20 -07:00
Alexander Capehart 4ad2fe1a58 info: fix readme version 2023-12-23 12:29:27 -07:00
Alexander Capehart 61cb520ab8 info: update changelog 2023-12-23 12:29:05 -07:00
Alexander Capehart c1fc548e6a tests: fix tests 2023-12-23 12:19:06 -07:00
Alexander Capehart 3f1f2f5c2d music: implement exporting frontend
Implement the exporting dialog and flow in all places in the app.
2023-12-23 12:16:02 -07:00
Alexander Capehart 68e4da5e7e music: make playlist export configurable
Add configuration options for:
- Using windows-compatible paths with \ separators and C:\\ volume
prefixes
- Switching between relative and absolute paths
2023-12-23 12:12:51 -07:00
Alexander Capehart c3f67d4dc5 music: fix m3u export
Wasn't correctly writing and also naively relative-izing paths. Those
should be fixed now, I hope.
2023-12-21 20:59:19 -07:00
Alexander Capehart d59230be6d music: re-add missing file 2023-12-20 22:53:08 -07:00
Alexander Capehart 771009d4ff music: add m3u exporting backend
Add the backend for exporting playlists to m3u files.
2023-12-20 22:49:02 -07:00
Alexander Capehart 3d92bdab6f info: update changelog 2023-12-20 13:49:43 -07:00
Alexander Capehart 5562c18415 tests: fix
Need to mock paths now
2023-12-20 13:39:49 -07:00
Alexander Capehart c995eb0d04 music: support m3u absolute paths
Under the assumption they are in the same volume as the file. It's
hacky, but whatever.
2023-12-20 13:32:13 -07:00
Alexander Capehart c66a9b19b5 music: more m3u support
- Turns out path extraction via MediaStore doesn't work, have to grok
the URI format.
- Added playlist name extraction
- Proactively handling whitespace
2023-12-20 13:28:36 -07:00
Alexander Capehart 634ff0d823 home: add playlist import flow
Connect the playlist importing system to the home view's playlist add
button.
2023-12-20 13:28:20 -07:00
Alexander Capehart 2195431c66 music: dont inject contentresolver
I don't know why, but I can't inject it without causing errors.
2023-12-20 12:12:40 -07:00
Alexander Capehart e553744c8e music: rename import to external
Apparently hilt doesn't like a module with the name import, probably
because of a keyword conflict.
2023-12-20 11:59:48 -07:00
Alexander Capehart 88bce610ca music: connect playlist importing to frontend 2023-12-20 11:04:54 -07:00
Alexander Capehart fff8212b0a music: add importing backend
Add basic importing infrastructure and an M3U parser to the backend.
2023-12-20 11:02:20 -07:00
Alexander Capehart 364675b252 music: revamp paths
Revamp paths with an entirely new abstraction that should improve
testability and integration with M3U playlists.
2023-12-19 22:14:59 -07:00
Alexander Capehart 08ca71b7b0 home: make playlist add a speed dial
Add a speed dial menu that allows you to create a new playlist or
import a playlist from elsewhere.
2023-12-19 15:11:01 -07:00
Alexander Capehart d3de34ed5e music: throw on deadlocks
Attempt to throw an exception when any part of the loading routine
times out.
2023-12-18 18:36:09 -07:00
Alexander Capehart 4cb309f01f playback: eliminate old viewpager stuff 2023-12-16 17:49:41 -07:00
Alexander Capehart b0dd13b9a3 Merge branch 'dev' into feature/cover_gestures 2023-12-17 00:30:33 +00:00
Alexander Capehart cd42c77304 playback: use ffmpeg first
Always decode with ffmpeg before decoding with MediaCodec.

MediaCodec is unreliable on some devices in such a way as to cause a
full loading failure on them. Prevent this by using ffmpeg.
2023-12-16 16:33:54 -07:00
Alexander Capehart bf1cbad1da build: update media 2023-12-16 15:45:07 -07:00
Alexander Capehart b7f33622e7 build: update media3 2023-12-16 15:17:53 -07:00
Alexander Capehart b9bcdf4a51 build: fix ndk 2023-12-16 14:33:17 -07:00
Alexander Capehart f4db2fcd80 build: use ndk r25
Apparently GH actions doesn't like NDK r26 yet.
2023-12-16 14:26:52 -07:00
Alexander Capehart 953b92108a build: update to ndk r26
Builds, unsure if it will cause any signifigant changes.
2023-12-16 14:21:14 -07:00
Alexander Capehart 4421d6cf36 music: deduplicate by case
At some point, the switch to keying raw music information broke my
mitigation for duplicate tags that use similar cases. This then
crashed the music loader in certain cases. Fix it by making the
check use raw music keys.

Resolves #614
2023-12-16 13:52:36 -07:00
Alexander Capehart 7a90e7eef1 build: update deps
Will need to put some work into updating some others
2023-12-16 13:51:49 -07:00
Alexander Capehart b1c48f13fd build: update agp
AGP -> 8.2.0

Requires me to enable Java 8 desugaring for some...reason.
2023-12-16 11:04:01 -07:00
Alexander Capehart 5204b59114 info: add android 14 to bug template 2023-11-26 14:56:55 -07:00
Alexander Capehart 9ae6b20fd1 music: decouple settings somewhat
Try to decouple the stateful music settings object from the stateless
internals of the music loader. This should make unit testing far
easier.
2023-11-12 11:55:22 -07:00
Alexander Capehart 0ad7a8955a music: eliminate all reference to artists albums
It's no longer used in any capacity.
2023-11-12 11:32:51 -07:00
Alexander Capehart d6801354ce music: only include explicit albums in count
Only include an artists explicit albums (ones directly linked w/album
artist) in their count.

This is arguably more appropriate than the prior behavior, given
Auxio's collaborator/artist distinction.

Resolves #581.
2023-11-12 11:26:27 -07:00
Alexander Capehart bf3c30e8af music: add demo release type
This is part of the MusicBrainz spec, but I didn't think of implementing
it. Turns out it's stupidly common among music releases, so may as well.

Resolves #590.
2023-11-12 11:12:59 -07:00
Alexander Capehart b4b830fbf4 build: separate 3.2.1 changelog 2023-11-12 11:05:49 -07:00
Alexander Capehart 7fef5a27da Revert "playback: temp revert swipe to next behavior"
This reverts commit df7ec27d1c.
2023-11-12 11:05:14 -07:00
Alexander Capehart d5017f8d38 Merge pull request #613 from OxygenCobalt/v3.2.1-cherrypick
Version 3.2.1
2023-11-12 17:22:22 +00:00
Alexander Capehart 0016c77836 music: bump cache version
Accidentally bumped it to version code 35, when this will be version
code 36.
2023-11-12 10:18:03 -07:00
Alexander Capehart df7ec27d1c playback: temp revert swipe to next behavior
It's too buggy to be in a release currently, I have to disable it for
now.
2023-11-12 10:00:41 -07:00
Alexander Capehart 917e6c0737 build: bump to v3.2.1
Bump to version 3.2.1 (35).
2023-11-12 10:00:35 -07:00
Alexander Capehart 23dac3b4b7 music: bump cache db version
Made some changes to tag interpretation, so all users have to rescan
now.
2023-11-12 09:59:08 -07:00
Alexander Capehart d926e19819 all: cleanup 2023-11-11 23:22:46 -07:00
Alexander Capehart ce5b9e35c7 util: inline log functions
A bit of a stupid workaround now that I use Timber and not my
self-rolled logging solution. Timber uses some weird heuristics for
names that I don't.
2023-11-11 23:14:50 -07:00
Alexander Capehart 52697ef891 detail: allow adding to playlist in playlist
The playback view can still add to a playlist from a playlist, so I
have to implement this navigation route no matter what.
2023-11-11 23:01:51 -07:00
Alexander Capehart a99b0ff615 ui: fix hebrew string crash
Caused by weblate once again conflating "many" with "other". I really
need to report that.

Resolves #575.
2023-11-11 22:55:24 -07:00
Alexander Capehart 08f3137c5b app: start service on draw-time
Recently, Android 14 seemed to have finally made it impossible to start
services in onStart. I never realized this error since I thought
onStart signified the beginning of the foreground state, when it was
actually onResume. I think it only worked prior due to race conditions.
Try to fix it by moving the service starting code to onResume.

See #608.
2023-11-11 22:49:35 -07:00
Alexander Capehart 48b0b11e88 all: random cleanup 2023-10-16 21:38:14 -06:00
Alexander Capehart f4518eb70f build: update deps
Forgot to update ksp.
2023-10-16 21:36:41 -06:00
Alexander Capehart 94e2c3c3e4 playback: further pager cleanup
- Use Replace instead of Diff for now since that avoids the scroll
state freaking out. In practice I'll likely need to radically refactor
this system (AGAIN...) to make the queue updates 100% fine-grained,
even during shuffling.
- Remove the behaivor of staying paused on the next track. That's
covered by #568.
2023-10-16 21:33:53 -06:00
Alexander Capehart 243fb73f94 music: add context to malformed errors
Makes debugging easier.
2023-10-16 21:03:42 -06:00
Alexander Capehart b19b6665bb music: accept native m4a multi-value tags
M4A has it's own multi-value spec that works similarly to vorbis, where
they just repeat the atom several times with multiple values. Since M4A
atoms are remapped to ID3v2 frames, this more or less requires us to
tolerate duplicate ID3v2 frames as well, which is frustratingly a spec
violation. It solves the problem though

Resolves #558.
2023-10-16 20:52:38 -06:00
Alexander Capehart 2fe0f3e7d8 playback: partially build back pager impl 2023-10-16 20:45:13 -06:00
Alexander Capehart d51da1b4bf playback: export playback reciever
Completely misunderstood how this would affect the widget/notification
on Android 14. Apparently it just blocks all intents, even if they are
tangentially from the app.

Resolves #598.
2023-10-16 20:31:53 -06:00
Alexander Capehart 4eacb65aff music: fix incorrect hashing
Forgot a + hashCode in like half of the hashing statements, ended up
causing incorrect image cache hits.
2023-10-16 20:30:24 -06:00
Alexander Capehart 73ef51c8be build: update deps 2023-10-16 20:06:50 -06:00
Alexander Capehart b84e3de3e0 info: clarify readme portions 2023-09-16 11:18:35 -06:00
Alexander Capehart 23c538e7aa Make README more professional
Yeah, this gets rid of a little of the character, but it these kinds of quips a little immature and might turn off recruiters.
2023-09-16 11:16:23 -06:00
Alexander Capehart 23d474278a music: fix failing tests
Use generic Collection instead of Set to prevent the new DeviceLibrary
tests from failing.
2023-09-03 21:14:53 -06:00
Alexander Capehart a4e8c250a3 music: add basic devicelibrary tests
Add basic devicelibrary initialization/glue tests.

This does not actually test the grouping process, as that is more
involved.
2023-09-03 21:04:46 -06:00
Alexander Capehart b3ef43b37e playback: start cleaning up pager impl
Fix some immediate compile issues and some style nitpicks. This breaks
the system a bit, but I don't think I will have enough time to debug
fully for the forseeable future, so I want to get this out now.
2023-08-22 07:29:06 -06:00
Alexander Capehart 83ec0c13da Merge pull request #503 from Koitharu/feature/cover_carousel
Cover art carousel on playback fragment
2023-08-21 07:50:31 -06:00
Alexander Capehart a1abcd7aac Merge branch 'dev' into feature/cover_carousel 2023-08-21 07:50:23 -06:00
Alexander Capehart ad672ed919 music: add cache repository test
Add tests for the cache repository and cache data structure.
2023-08-18 19:34:23 -06:00
Alexander Capehart 881fb58648 music: consider settings in equality
Make it so that music items are meaningfully different when they were
created under different settings. This resolves an issue where music
information would not correctly update when separators or intelligent
sorting would change.

Resolves #546.
2023-08-18 16:00:03 -06:00
Alexander Capehart 9a67a0d539 util: use timber for logging
This will make testing app components a lot easier since it removes the
logging dependency used in most shared objects.
2023-08-18 15:55:20 -06:00
Alexander Capehart fcffb56021 music: use factory to create known names
Implement a new Name.Known.Factory instance that replaces the usage of
Name.Known.from.

This again allows songs to be differentiated on tag interpretation and
is generally easier to test.
2023-08-18 15:27:45 -06:00
Alexander Capehart c1655a9eca music: move multi-value util to separators
Move all multi-value utilities to a new Separators interface.

This should allow separator config to be dynamically compared across
song instances, and generally make songs easier to test.
2023-08-18 14:15:23 -06:00
Alexander Capehart 59e42acad9 test: re-implement tests
Reimplement the tests of music modeling, and re-enable the automatic
test workflow in GH actions.

I'm actually going to work on reimplementing these.
2023-08-18 11:54:47 -06:00
Alexander Capehart 2c2bd79ae2 music: trim simple names after punct removal
Trim simple names once punctuation has been removed.

This prevents situations where album names like "& Yet & Yet" (a real
album by post-rock outfit Do Make Say Think) will have blank thumbs.
This probably isn't the best approach in general, but nothing about the
intelligent name system is a good approach.
2023-08-18 11:47:50 -06:00
Alexander Capehart 5cd46193d5 Merge pull request #545 from OxygenCobalt/dev
Version 3.2.0
2023-08-18 08:46:18 -06:00
Alexander Capehart d0b34a14e4 playback: fix broken item navigation
Caused yet again by sharing StateFlows leading to a strange
out-of-order collector notification, which then allows detail
fragments to consume item navigation requests before the playback
panel can even get them. SharedFlow doesn't help here, so we are
just forced to move this to MainFragment which does not have this
issue for some reason.
2023-08-17 20:43:39 -06:00
Alexander Capehart 20c34fd888 music: fix crash on adding to new playlist
Apparently dialog fragments do not change the state of the fragment it
is overlaid on, resulting in it still having active StateFlow
collectors that will intercept new playlist requests before
AddToPlaylistDialog. Once again sharing StateFlows across views has
bit me.

In the future I may try to preserve the navigation idioms by not
stacking NewPlaylistDialog on AddToPlaylistDialog and instead
simply swap them out. I think this would also be better design too
(It's not like I'm allowing other decision dialogs to be exitable
back to their prior dialog).
2023-08-17 20:39:05 -06:00
Alexander Capehart d297c10b0a detail: fix crash on multi-artist navigation
Caused by an unimplemented navigation branch in ArtistDetailFragment.
2023-08-17 20:25:39 -06:00
Alexander Capehart 58989f8568 build: revert to navigation 2.5.3
I would have to duplicate the workaround for every fragment in the
project. Easier to just roll back until it's fixed.
2023-08-16 19:58:38 -06:00
Alexander Capehart 12bc46e210 build: bump to 3.2.0
Bump Auxio to version 3.2.0 (35).
2023-08-16 19:43:59 -06:00
Alexander Capehart 8026849856 all: cleanup 2023-08-16 19:41:19 -06:00
Alexander Capehart f400aa513c ui: mitigate navigation desync bug
This thing reared it's ugly head again during 3.2.0 testing. I think
I've found a terrible but probably functional workaround for it. Start
using it.
2023-08-16 19:23:40 -06:00
Alexander Capehart 449ec7cecd ui: fix gap in landscape bottom sheet dialog
Apparently a second-order effect of the prior fix since the insetTop
value would now shift the dialog downwards unneccessarily.
2023-08-16 17:32:26 -06:00
Alexander Capehart 70a5bab921 ui: vendor bottom sheet dialog w/fixes
Vendor BottomSheetDialog(Fragment) with the inset fix that prior used
reflection.

Apparently said reflection breaks down and crashes the release build
somehow. So now I just have to hastily patch BackportBottomSheetBehavior
and vendor another 1000 lines of MDC code.

Really considering making a PHP sadness-like blog solely for android
at this point.
2023-08-16 17:12:56 -06:00
Alexander Capehart b43e4695c0 build: update deps
fragment: 1.6.0 -> 1.6.1
preferences: 1.2.0 -> 1.2.1
room: 2.6.0-alpha02 -> 2.6.0-alpha03
material: 1.10.0-alpha05 -> 1.10.0-alpha06
media: 1.1.0 -> 1.1.1
2023-08-16 15:11:52 -06:00
Alexander Capehart e32fc6b609 home: fix misaligned grant/retry button
Caused by naive visibility logic when I added the "More" button prior.

Resolves #544.
2023-08-15 20:48:17 -06:00
Alexander Capehart e912120f9f all: general cleanup 2023-08-14 19:54:43 -06:00
Alexander Capehart f5c7f25cdf home: add music loading error dialog
Add a dialog that shows the stack trace of a music loading error.

This is an MVP that is only available to music loading to resolve some
immediate issues.

Resolves #527.
2023-08-14 17:46:01 -06:00
Alexander Capehart ada29b2f7a ui: improve bottom sheet edge-to-edge support
Don't disable bottom sheet inset calculations and use the expanded
state hack to mitigate for the peek height calculation, instead,
just clobber the window inset routine to fix the peek height while
not applying the padding. The expanded hack still remains, but is
now relegated to the cases where the 16:9 keyline breaks down.
2023-08-14 17:46:01 -06:00
Alexander Capehart 4ade27e66d ui: avoid lopsided bottom sheet handles
By default, bottom sheet handles have 16dp bottom padding for some
reason. This looked really bad on the dialogs, so remove it there.
Only keep it on the queue handle, since it has a companion label that
will overlap if not lopsided.
2023-08-14 17:46:01 -06:00
Alexander Capehart c42a3ca97c ui: refine navigation listeners
Make sure that we don't drop selections or playlist edits when we
navigate to dialogs, this time achieved through a more general
navigation listener implementation than prior.
2023-08-03 13:14:12 -06:00
Alexander Capehart 151b69bedb list: add selection menu
Add a menu dialog for selections. This more or less completes the
bottom sheet menu functionality.

Resolves #454.
2023-08-03 11:52:43 -06:00
Alexander Capehart c838813434 Merge branch 'dev' into feature/cover_carousel 2023-07-28 10:19:47 -06:00
Alexander Capehart 6d342325ea list: open menu dialogs from toolbars
Make it so that toolbars now open menu dialogs as items do.

This excludes the selection menu currently since there's no dialog for
such.
2023-07-28 08:44:31 -06:00
Alexander Capehart 507bc516ce ui: fix edit layout crashes
Fix crashes that prevented android studio from showing layout previews
of certain views.
2023-07-27 15:42:19 -06:00
Alexander Capehart 6ac757b952 list: move sort settings to module
Move sort settings from music -> list, since they're probably better
there anyway.
2023-07-25 21:01:54 -06:00
Alexander Capehart d6d1071535 all: cleanup
Routine code inspection and cleanup, this time with the new lints from
android studio giraffe.
2023-07-25 20:45:30 -06:00
Alexander Capehart 842677fab4 ui: fix broken back navigation
Caused by a change in a dependency update that suddenly causes
FragmentManager's back callback to to jump ahead of ours for no
reason.
2023-07-25 19:58:03 -06:00
Alexander Capehart 6ef2f74694 detail: add playlist resorting
Add the ability to resort a playlist when in edit mode.

Resolves #446.
2023-07-25 19:58:03 -06:00