settings: add option to force-reload the app
Add an option to force-reload the app. Currently, Auxio will load music once and then never re-load it. This is a really decision I made early on and now regret completely. The only way to remedy this properly is to create an automatic rescanning system, but that is a major technical undertaking that I want to save for later. Resolves #71.
This commit is contained in:
@@ -37,6 +37,7 @@ import org.oxycblt.auxio.home.tabs.TabCustomizeDialog
|
||||
import org.oxycblt.auxio.playback.PlaybackViewModel
|
||||
import org.oxycblt.auxio.settings.pref.IntListPrefDialog
|
||||
import org.oxycblt.auxio.settings.pref.IntListPreference
|
||||
import org.oxycblt.auxio.util.hardRestart
|
||||
import org.oxycblt.auxio.util.isNight
|
||||
import org.oxycblt.auxio.util.logD
|
||||
import org.oxycblt.auxio.util.showToast
|
||||
@@ -165,6 +166,16 @@ class SettingsListFragment : PreferenceFragmentCompat() {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsManager.KEY_RELOAD -> {
|
||||
onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
playbackModel.savePlaybackState(requireContext()) {
|
||||
requireContext().hardRestart()
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
SettingsManager.KEY_EXCLUDED -> {
|
||||
onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
ExcludedDialog().show(childFragmentManager, ExcludedDialog.TAG)
|
||||
|
||||
@@ -291,6 +291,7 @@ class SettingsManager private constructor(context: Context) :
|
||||
const val KEY_LOOP_PAUSE = "KEY_LOOP_PAUSE"
|
||||
|
||||
const val KEY_SAVE_STATE = "auxio_save_state"
|
||||
const val KEY_RELOAD = "auxio_reload"
|
||||
const val KEY_EXCLUDED = "auxio_excluded_dirs"
|
||||
|
||||
const val KEY_SEARCH_FILTER_MODE = "KEY_SEARCH_FILTER"
|
||||
|
||||
@@ -103,6 +103,8 @@
|
||||
<string name="set_content">Content</string>
|
||||
<string name="set_save">Save playback state</string>
|
||||
<string name="set_save_desc">Save the current playback state now</string>
|
||||
<string name="set_reload">Reload music</string>
|
||||
<string name="set_reload_desc">Reload the music library (Will restart app)</string>
|
||||
<string name="set_excluded">Excluded folders</string>
|
||||
<string name="set_excluded_desc">The content of excluded folders is hidden from your library</string>
|
||||
|
||||
|
||||
@@ -151,6 +151,12 @@
|
||||
app:summary="@string/set_save_desc"
|
||||
app:title="@string/set_save" />
|
||||
|
||||
<Preference
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="auxio_reload"
|
||||
app:summary="@string/set_reload_desc"
|
||||
app:title="@string/set_reload" />
|
||||
|
||||
<Preference
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="auxio_excluded_dirs"
|
||||
|
||||
@@ -30,6 +30,11 @@ This is probably caused by one of two reasons:
|
||||
|
||||
This is expected since reading from the audio database takes awhile, especially with libraries containing 10k songs or more.
|
||||
|
||||
#### Auxio does not detect new music!
|
||||
|
||||
This is a current limitation with the music loader. To remedy this, go to Settings -> Reload music whenever new songs are added.
|
||||
I hope to make the loader do this automatically eventually.
|
||||
|
||||
#### ReplayGain isn't working on my music!
|
||||
|
||||
This is for a couple reason:
|
||||
|
||||
Reference in New Issue
Block a user