music: add indexer service

Add a dedicated service towards the loading of the music library.

This new service was created for two reasons:
1. Music loading is slow and resource-intensive, so putting it on the
ViewModel layer just didn't seem right and made it vulnerable to the
OS simply stopping the loading process.
2. For automatic rescanning [#72], there must be something watching
the music library and waiting for a change in the background. This
would require a service as that is probably the least insane way to
do that kind of background work.

I have no garuntees how viable the service might be. If anything, it
might be halted by some insane android restriction or issue that
makes it more or less impossible to use for most apps, and I will have
to largely drop truly automatic rescanning.
This commit is contained in:
OxygenCobalt
2022-06-03 20:12:27 -06:00
parent e3708bf5f5
commit 08caa01dca
16 changed files with 233 additions and 59 deletions
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4.2,5l-0.7,1.9L17.6,12L3,12v8h18v-8.86L4.2,5zM7,17L5,17v-2h2v2zM19,17L9,17v-2h10v2z"/>
</vector>
+1
View File
@@ -3,6 +3,7 @@
<!-- Info namespace | App labels -->
<string name="info_app_desc">A simple, rational music player for android.</string>
<string name="info_playback_channel_name">Music Playback</string>
<string name="info_indexer_channel_name">Music Loading</string>
<string name="info_widget_desc">View and control music playback</string>
<!-- Label Namespace | Static Labels -->