music: rework library update process [#176]

Update the library update process to be on a co-routine, updating
callbacks on the main thread.

For some insane reason, the Main dispatcher used normally when
loading music just disappears sometimes. This leads to unpleasent
crashes as callbacks expect to be called on the app thread, not
any background threads.

Fix this by forcing the Main dispatcher during the update process.
This requires the music update process to also run on a background
thread, albeit that will be useful for automatic rescanning late ron.
This commit is contained in:
OxygenCobalt
2022-07-01 08:54:42 -06:00
parent 090a1713dd
commit e883336b04
18 changed files with 48 additions and 38 deletions
+1 -3
View File
@@ -31,10 +31,8 @@
<dimen name="size_pre_amp_ticker">56dp</dimen>
<dimen name="text_size_ext_label_larger">16sp</dimen>
<dimen name="text_size_ext_title_mid_large">18sp</dimen>
<dimen name="text_size_track_number_min">12sp</dimen>
<dimen name="text_size_track_number_max">20sp</dimen>
<dimen name="text_size_track_number_max">22sp</dimen>
<dimen name="text_size_track_number_step">2sp</dimen>
<!-- Misc -->