music: add option to disable article sort names

Add a setting to remove hard-coded sort names based on articles.

This feature is nice, but does not work with some non-english music.
Those individuals should have the ability to disable it.

The implementation honestly is not the greatest, primarily because it
does a 100% reload when it could just regenerate the library. Auxio's
current music model isn't really designed for that, so it will do this
until a need to that kind of "soft reload" really arises.

Resolves #359.
This commit is contained in:
Alexander Capehart
2023-02-20 18:34:01 -07:00
parent 2d9a5ad5cd
commit 45fe36bd09
7 changed files with 75 additions and 29 deletions
+1
View File
@@ -18,6 +18,7 @@
<string name="set_key_music_dirs_include" translatable="false">auxio_include_dirs</string>
<string name="set_key_exclude_non_music" translatable="false">auxio_exclude_non_music</string>
<string name="set_key_separators" translatable="false">auxio_separators</string>
<string name="set_key_auto_sort_names" translatable="false">auxio_auto_sort_names</string>
<string name="set_key_headset_autoplay" translatable="false">auxio_headset_autoplay</string>
<string name="set_key_replay_gain" translatable="false">auxio_replay_gain</string>
+2
View File
@@ -212,6 +212,8 @@
<string name="set_separators_plus">Plus (+)</string>
<string name="set_separators_and">Ampersand (&amp;)</string>
<string name="set_separators_warning">Warning: Using this setting may result in some tags being incorrectly interpreted as having multiple values. You can resolve this by prefixing unwanted separator characters with a backslash (\\).</string>
<string name="set_auto_sort_names">Ignore articles when sorting</string>
<string name="set_auto_sort_names_desc">Ignore words like \"the\" when sorting by name (works best with english-language music)</string>
<string name="set_hide_collaborators">Hide collaborators</string>
<string name="set_hide_collaborators_desc">Only show artists that are directly credited on an album (works best on well-tagged libraries)</string>
<string name="set_images">Images</string>
@@ -20,6 +20,12 @@
app:summary="@string/set_separators_desc"
app:title="@string/set_separators" />
<SwitchPreferenceCompat
app:defaultValue="true"
app:key="@string/set_key_auto_sort_names"
app:summary="@string/set_auto_sort_names_desc"
app:title="@string/set_auto_sort_names" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="@string/set_key_hide_collaborators"