Commit graph

1462 commits

Author SHA1 Message Date
Alexander Capehart
7d42d016f1
playback: simplify panel command
Simplify the Panel command from a sealed interface to a enum.

They held no data, better to use an enum and improve switch
performance.
2023-07-06 20:07:16 -06:00
Alexander Capehart
0cd59ce4e0
all: redocument navigation system
Add documentation for the new navigation system, which largely
completes this change.
2023-07-04 21:44:34 -06:00
Alexander Capehart
7239256e27
list: unify viewmodels
Unify the disjoint selection and menu viewmodels into a single
ListViewModel.

This is technically not fully done, as MenuViewModel remains as a
backing element of the menu dialogs, but otherwise that's it.
2023-07-04 20:37:55 -06:00
Alexander Capehart
b4ffffedfd
list: make adding selection to playlist easier
Make adding selection information to a playlist signifigantly easier
than prior.
2023-07-04 15:19:48 -06:00
Alexander Capehart
b4394c3a4a
util: fix horrible numeric function naming
"nonZeroOrNull" is actuallly more apt as "positiveOrNull".
2023-07-04 15:16:08 -06:00
Alexander Capehart
7adf7f7beb
music: index negative replaygain tags
Caused by an absurd error stemming from absurd helper function naming.
2023-07-04 15:09:47 -06:00
Alexander Capehart
ada446767d
image: make coverview respond to settings
Make CoverView respond to all cover settings and the round mode
setting.
2023-07-04 15:01:12 -06:00
Alexander Capehart
e490ff64c1
playback: make bar action respond to settings
Now that the navigation graphs are unified, the playback bar now has to
respond to when it's custom action setting changes.
2023-07-04 14:38:33 -06:00
Alexander Capehart
9e5b737d1a
playback: refactor navigation commands
Unify the artist and genre picker commands into a single event
(like others), and also make the playback panel correctly respond to
album/artist navigation events.
2023-07-04 14:24:46 -06:00
Alexander Capehart
a6a3eceb7b
music: re-add add -> new playlist route
Re-add the add to playlist -> new playlist route that was accidentally
removed at some point.
2023-07-04 13:27:23 -06:00
Alexander Capehart
14107c9444
all: standardize nav consume usage
Standardize navigation command consumption to only occur when a
navigation route has *definitively* ended. If more commands could
come, observe them. Otherwise, consume immediately.
2023-07-04 13:20:13 -06:00
Alexander Capehart
ab2b853737
list: expand item menus
Bit of a megapatch that:
- Adds dedicated play, shuffle, and view items to all item menus
(songs haven't been fully implemented yet)
- Adds icons to all item menus
- Re-adds enabled/disabled items to menus
- Makes menu action naming conventions more consistent with the rest
of the app
2023-07-04 11:15:19 -06:00
Alexander Capehart
f84b6f68b3
ui: fix queue sheet not being scrollable
Fix an issue where the recent BackportBottomSheetBehavior update would
break queue sheet scrolling, as the queue sheet would be set to
invisible and prevent the findScrollingChild helper from being able
to locate it.

Fix this by removing that visibility check in the first place.
2023-07-03 20:34:25 -06:00
Alexander Capehart
39b1fd1057
menu: move item logic from listfragment
Move menu action logic from ListFragment into corresponding
MenuFragments.
2023-07-03 20:05:49 -06:00
Alexander Capehart
d6a20fedb3
all: use menu everywhere
Use the new menu system in all applicable places.

More consideration is needed right now on whether the toolbars should
also have menu items, so they remain unchanged right now.
2023-07-03 16:52:42 -06:00
Alexander Capehart
0d896c04e3
list: clean up menu impl
Clean up the some minor mistakes in the new menu dialog implementation.
2023-07-03 16:08:17 -06:00
Alexander Capehart
db2e9e12f0
list: add type-specific menu impls
Add menus for each fundamental music datatype. Each will display
information about the data contained.
2023-07-03 15:18:04 -06:00
Alexander Capehart
c1158b1a07
list: add menu dialog framework
Add a dialog that shows menu information as a bottom sheet instead of as
a PopupMenu.

This did not take as much finessing of BottomSheetBehavior as the main
playback UI framework did, just some style redefinitions.
2023-07-03 14:28:32 -06:00
Alexander Capehart
6dc2892eb9
home: fix settings anim
Fix mismatched navigation animations when going to settings and back.
2023-07-03 10:45:32 -06:00
Alexander Capehart
a1efb0c34a
ui: rename menu resources
Switch from redundant menu_* prefixes to more use-specific prefixes
used elsewhere.
2023-06-30 20:31:15 -06:00
Alexander Capehart
fcbce0fb98
ui: fix issues from new nav
Fix miscellanious issues from the flattened nav graph system.

Nowhere near enough, largely counting on the planned bottom sheet menus
to eventually be able to ignore most of these issues.
2023-06-27 20:05:04 -06:00
Alexander Capehart
9b0e39919b
music: simplify playlist decision events
Simplify the 4 stateflows controlling when playlist decision dialogs
must be opened to just one enum.

This is like the detail view, and makes the amount of observers I have
to spin up much smaller.

Eventually, most of even these observer calls will be collapsed into
the menu itself.
2023-06-27 19:43:15 -06:00
Alexander Capehart
07e9ca8ef6
ui: flatten nav graph
Flatten the navigation graph into a single "main" graph that links
home to both explore and preference fragments.

***This massively breaks the app in it's current state***. Further
changes and refactors are needed to get this back to working.
2023-06-27 17:30:11 -06:00
Alexander Capehart
f8a0a42dd3
music: finalize duplicate tags fix
Officially finalize the fix for #484, at least I think.

Resolves #484.
2023-06-26 17:56:48 -06:00
Alexander Capehart
6f6a3d8d31
music: handle duplicate artist/genre values
Remove functionally duplicate artist/genre values that were read from
a file.

This caused a indexer crash in 3.1.2 due to the switch to music sets,
which no longer made duplicate values group the song twice. This then
cascaded to a failure in song finalization, as it expects there to be
the same amount of artists/genres as raw artists/genres.
2023-06-25 16:49:44 -06:00
Alexander Capehart
5bda85fe36
all: minor cleanup 2023-06-24 17:45:36 -06:00
Alexander Capehart
2adb34dffe
music: prevent deadlock on no-op refreshes
Fix a regression where the loading process will never stop on a no-op
refresh operation.

This was an oversight made in the redocumentation of the loading
process.
2023-06-24 17:30:56 -06:00
Alexander Capehart
29162820ae
ui: update bottomsheetbehavior
Update BottomSheetBehavior to the latest commit in 1.10.0-alpha04.

This adds a few new APIs that I still can't really use. I could in the
future.
2023-06-24 17:30:06 -06:00
Alexander Capehart
992457f361
music: document indexing process
Further document the music indexing process.

It's so aggressively parallelized as to require some more extensive
comments to actually make it clear what's going on.
2023-06-24 10:34:31 -06:00
Alexander Capehart
ed7b4e1410
music: recognize spaced artist tags
Recognize artists sort, albumartists sort, and album artists tags.

These are written by mediafile, so they are probably also written by
other software.
2023-06-24 09:04:21 -06:00
Alexander Capehart
19e8536323
music: fix testing artifacts in loading process
Fix testing lines created when working on the prior commit.
2023-06-23 08:49:08 -06:00
Alexander Capehart
036d952085
music: avoid hanging on discovery errors
Do not hang when an error halts the discovery process.

This was an oversight with the previous band-aid fix regarding handling
errors in music loading. If something failed, the channels would not
close, resulting in the main loop consuming the channel hanging.

There's probably a deeper issue causing this in 3.1.2, but with this
fix I can actually start digging for it.
2023-06-23 08:43:21 -06:00
Alexander Capehart
903a3e561a
image: add option to restore 1:1 crop behavior
Add an option to restore the old 1:1 crop behavior to the app.

Some people think this looks better, some people like to have youtube
thumbnails in their APICs. Can't really be opinionated here.
2023-06-20 17:25:37 -06:00
Alexander Capehart
8c604dae68
Merge branch 'api34' into dev 2023-06-20 16:58:48 -06:00
Alexander Capehart
7b4af3515d
music: prioritize earlier album artist info
Prioritize artist information from earlier albums (date-wise), as it's
less likely to change with the addition of new music.
2023-06-15 19:11:31 -06:00
Alexander Capehart
321bbcf03f
all: fix api 34 crashes
Fix general API 34 crashes that I could notice immediately.

Can really test any further since the API 34 AVDs are currently potatos
running at 3 FPS for some reason.
2023-06-15 13:32:05 -06:00
Alexander Capehart
6b43a65e56
build: update to api 34
Update the app to target API 34, alongside all dependencies that expect
such.

This finally fixes some long-standing issues in newer version of MDC,
thus allowing me to remove the divider backport as well.

More work is required for predictive back (don't even know where I
start with that...), but this is a good start.
2023-06-15 13:06:17 -06:00
Alexander Capehart
839861b6b8
music: fix grouping regressions
Fix regressions in grouping, mostly around the kind of music that is
prioritized and sort naming.
2023-06-15 12:58:10 -06:00
Alexander Capehart
31d647123f
music: use set for child information
Use sets for all child music information.

Unlike parent information, which usually has an ordering derived from
file information, child music information more or less doesn't, and
will be consistently re-interpreted by the app to apply user-configured
sorts.
2023-06-13 10:44:53 -06:00
Alexander Capehart
d22de34fd3
music: use sets for library information
Use a Set when storing all song, album, artist, and genre information.

These all have no consistent ordering due to parallelization, and
should be communicated as such.
2023-06-13 10:03:48 -06:00
Alexander Capehart
5b44c31689
music: sort song information
Sort song informtion in all MusicParent instances.

This is a temporary hack to band-aid music consistency between reloads,
as with the aggressive parallelization song order is no longer
consistent.
2023-06-13 09:37:18 -06:00
Alexander Capehart
530e427b79
music: improve library updates
Update library information in a synchronized block and then only
dispatch the update on the main thread.
2023-06-13 08:58:08 -06:00
Alexander Capehart
0771a75b5a
playback: ignore zeroed replaygain tags
Ignore ReplayGain adjustments that are just 0 dB.
2023-06-13 08:57:03 -06:00
Alexander Capehart
4ee20bc112
playback: fix regression regarding partial rgadj
Fix a regression where partial ReplayGain adjustments missing an album
or track component would not be indexed.

This was an oversight made when moving adjustments to the cache, as the
nullability model of ReplayGain adjustments changed.
2023-06-09 10:08:44 -06:00
Alexander Capehart
672c256b1e
music: group albums by raw artist keys
Properly group albums by raw artist keys, instead of by raw artist
instances.

This was an accidental regression in 3.1.1 that resulted in duplicate
albums in some circumstances.

Resolves #475.
2023-06-08 20:40:09 -06:00
Alexander Capehart
e848bea0bf
music: remove zero digit-likes from names
Remove all characters with a semantic meaning of "zero" from the start
of music names, at least when intelligent sorting is enabled.
2023-06-08 14:09:09 -06:00
Alexander Capehart
93d3e82140
ui: use targetstate more
Use targetState whenever making decisions on whether a certain sheet
state change is valid.

This is mostly for stylistic consistency and has no effect on UX.
2023-06-08 13:49:24 -06:00
Alexander Capehart
abe4255986
list: actually update playlist selections
Remove an incorrect change check resulting in the selection not
updating when playlist information changed.

Resolves #476.
2023-06-08 13:37:12 -06:00
Alexander Capehart
59280cc6d5
playback: standardize table names
Just let room pick the table names for PersistenceDatabase, instead of
using custom ones.

Reduces the amount of code in that part of the app.
2023-06-08 10:23:49 -06:00
Alexander Capehart
aaba858fcf
all: only use one fallback method for dbs
Only use fallbackToDestructiveMigration for all databases.

I thought you had to selectively enable downgrading as well, but
apparently that disables other destructive migrations. This was not
obvious at all and caused countless issues. Absolutely flooring.
2023-06-08 10:15:04 -06:00