diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-07-27 18:01:58 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-07-27 18:01:58 -0700 |
commit | 7c3e7ebd7938ab05c375f5c64ceb85518b355656 (patch) | |
tree | 3d0982cbf4f122a1acf7d4066bb41ee3c68d83e7 /app | |
parent | 4de0a87270bc3801041f6b4c9cd52e4c3bcd2e93 (diff) | |
download | dsub-7c3e7ebd7938ab05c375f5c64ceb85518b355656.tar.gz dsub-7c3e7ebd7938ab05c375f5c64ceb85518b355656.tar.bz2 dsub-7c3e7ebd7938ab05c375f5c64ceb85518b355656.zip |
Fixes #714: Add different options for action when pressing a song
Diffstat (limited to 'app')
21 files changed, 114 insertions, 111 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java index c9b94c9a..e971bfb6 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java @@ -127,19 +127,7 @@ public class SelectArtistFragment extends SelectRecyclerFragment<Serializable> i if (entry.isVideo()) { playVideo(entry); } else { - List<Entry> songs = new ArrayList<Entry>(); - - if (Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PLAY_NOW_AFTER, true)) { - for (Entry song : entries) { - if (!song.isDirectory() && !song.isVideo()) { - songs.add(song); - } - } - playNow(songs, entry, 0); - } else { - songs.add(entry); - playNow(songs); - } + onSongPress(entries, entry); } } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java index 03c6663a..c320f3c1 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java @@ -91,7 +91,8 @@ public class SelectBookmarkFragment extends SelectRecyclerFragment<MusicDirector return; } - if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PLAY_NOW_AFTER, true) && ((!Util.isTagBrowsing(context) && bookmark.getParent() != null) || (Util.isTagBrowsing(context) && bookmark.getAlbumId() != null)) && !bookmark.isPodcast()) { + boolean allowPlayAll = ((!Util.isTagBrowsing(context) && bookmark.getParent() != null) || (Util.isTagBrowsing(context) && bookmark.getAlbumId() != null)) && !bookmark.isPodcast(); + if(allowPlayAll && "all".equals(Util.getSongPressAction(context))) { new RecursiveLoader(context) { @Override protected Boolean doInBackground() throws Throwable { @@ -111,7 +112,7 @@ public class SelectBookmarkFragment extends SelectRecyclerFragment<MusicDirector } }.execute(); } else { - playNow(Arrays.asList(bookmark), bookmark, bookmark.getBookmark().getPosition()); + onSongPress(Arrays.asList(bookmark), bookmark, bookmark.getBookmark().getPosition(), false); } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index de74d0ed..05a46b9d 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -359,21 +359,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section return; } - playNow(Arrays.asList(entry)); + onSongPress(Arrays.asList(entry), entry, false); } else { - List<Entry> songs = new ArrayList<Entry>(); - - if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PLAY_NOW_AFTER, true) && (albumListType == null || "starred".equals(albumListType))) { - for(Entry song: entries) { - if(!song.isDirectory() && !song.isVideo()) { - songs.add(song); - } - } - playNow(songs, entry, 0); - } else { - songs.add(entry); - playNow(songs); - } + onSongPress(entries, entry, albumListType == null || "starred".equals(albumListType)); } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java index 2e2a16b3..9011b4c5 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java @@ -239,7 +239,7 @@ public class SelectPodcastsFragment extends SelectRecyclerFragment<Serializable> return; } - playNow(Arrays.asList((MusicDirectory.Entry) episode)); + onSongPress(Arrays.asList((MusicDirectory.Entry) episode), episode, false); } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index b2ac715a..ad064d01 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -78,6 +78,7 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared private ListPreference pauseDisconnect; private Preference addServerPreference; private PreferenceCategory serversCategory; + private ListPreference songPressAction; private ListPreference videoPlayer; private ListPreference syncInterval; private CheckBoxPreference syncEnabled; @@ -217,6 +218,7 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared serversCategory = (PreferenceCategory) this.findPreference(Constants.PREFERENCES_KEY_SERVER_KEY); addServerPreference = this.findPreference(Constants.PREFERENCES_KEY_SERVER_ADD); videoPlayer = (ListPreference) this.findPreference(Constants.PREFERENCES_KEY_VIDEO_PLAYER); + songPressAction = (ListPreference) this.findPreference(Constants.PREFERENCES_KEY_SONG_PRESS_ACTION); syncInterval = (ListPreference) this.findPreference(Constants.PREFERENCES_KEY_SYNC_INTERVAL); syncEnabled = (CheckBoxPreference) this.findPreference(Constants.PREFERENCES_KEY_SYNC_ENABLED); syncWifi = (CheckBoxPreference) this.findPreference(Constants.PREFERENCES_KEY_SYNC_WIFI); @@ -384,6 +386,7 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared keepPlayedCount.setSummary(keepPlayedCount.getEntry()); tempLoss.setSummary(tempLoss.getEntry()); pauseDisconnect.setSummary(pauseDisconnect.getEntry()); + songPressAction.setSummary(songPressAction.getEntry()); videoPlayer.setSummary(videoPlayer.getEntry()); if(replayGain.isChecked()) { diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index ab3db50f..f6e65c0e 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -1663,6 +1663,33 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR dialog.show(); } + protected void onSongPress(List<Entry> entries, Entry entry) { + onSongPress(entries, entry, 0, true); + } + protected void onSongPress(List<Entry> entries, Entry entry, boolean allowPlayAll) { + onSongPress(entries, entry, 0, allowPlayAll); + } + protected void onSongPress(List<Entry> entries, Entry entry, int position, boolean allowPlayAll) { + List<Entry> songs = new ArrayList<Entry>(); + + String songPressAction = Util.getSongPressAction(context); + if("all".equals(songPressAction) && allowPlayAll) { + for(Entry song: entries) { + if(!song.isDirectory() && !song.isVideo()) { + songs.add(song); + } + } + playNow(songs, entry, position); + } else if("next".equals(songPressAction)) { + getDownloadService().download(Arrays.asList(entry), false, false, true, false); + } else if("last".equals(songPressAction)) { + getDownloadService().download(Arrays.asList(entry), false, false, false, false); + } else { + songs.add(entry); + playNow(songs); + } + } + protected void playNow(List<Entry> entries) { playNow(entries, null, null); } diff --git a/app/src/main/java/github/daneren2005/dsub/updates/Updater.java b/app/src/main/java/github/daneren2005/dsub/updates/Updater.java index a2870941..bc053b1e 100644 --- a/app/src/main/java/github/daneren2005/dsub/updates/Updater.java +++ b/app/src/main/java/github/daneren2005/dsub/updates/Updater.java @@ -37,13 +37,17 @@ public class Updater { protected Context context; public Updater(int version) { + // 5.2 should show as 520 instead of 52 + if(version < 100) { + version *= 10; + } this.version = version; } public void checkUpdates(Context context) { this.context = context; List<Updater> updaters = new ArrayList<Updater>(); - updaters.add(new Updater403()); + updaters.add(new UpdaterSongPress()); SharedPreferences prefs = Util.getPreferences(context); int lastVersion = prefs.getInt(Constants.LAST_VERSION, 0); diff --git a/app/src/main/java/github/daneren2005/dsub/updates/Updater403.java b/app/src/main/java/github/daneren2005/dsub/updates/Updater403.java deleted file mode 100644 index 4f2cbf43..00000000 --- a/app/src/main/java/github/daneren2005/dsub/updates/Updater403.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Subsonic. - - Subsonic is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Subsonic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Subsonic. If not, see <http://www.gnu.org/licenses/>. - - Copyright 2009 (C) Sindre Mehus - */ -package github.daneren2005.dsub.updates; - -import android.content.Context; -import android.util.Log; -import github.daneren2005.dsub.updates.Updater; -import github.daneren2005.dsub.util.Constants; -import github.daneren2005.dsub.util.FileUtil; -import java.io.File; - -/** - * - * @author Scott - */ -public class Updater403 extends Updater { - public Updater403() { - super(403); - TAG = Updater403.class.getSimpleName(); - } - - @Override - public void update(Context context) { - // Rename cover.jpeg to cover.jpg - Log.i(TAG, "Running Updater403: updating cover.jpg to albumart.jpg"); - File dir = FileUtil.getMusicDirectory(context); - if(dir != null) { - moveArt(dir); - } - } - - private void moveArt(File dir) { - for(File file: dir.listFiles()) { - if(file.isDirectory()) { - moveArt(file); - } else if("cover.jpg".equals(file.getName()) || "cover.jpeg".equals(file.getName())) { - File renamed = new File(dir, Constants.ALBUM_ART_FILE); - file.renameTo(renamed); - } - } - } -} diff --git a/app/src/main/java/github/daneren2005/dsub/updates/UpdaterSongPress.java b/app/src/main/java/github/daneren2005/dsub/updates/UpdaterSongPress.java new file mode 100644 index 00000000..7efa18e4 --- /dev/null +++ b/app/src/main/java/github/daneren2005/dsub/updates/UpdaterSongPress.java @@ -0,0 +1,42 @@ +/* + This file is part of Subsonic. + Subsonic is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Subsonic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Subsonic. If not, see <http://www.gnu.org/licenses/>. + Copyright 2016 (C) Scott Jackson +*/ + +package github.daneren2005.dsub.updates; + +import android.content.Context; +import android.content.SharedPreferences; + +import github.daneren2005.dsub.util.Constants; +import github.daneren2005.dsub.util.Util; + +public class UpdaterSongPress extends Updater { + public UpdaterSongPress() { + super(521); + TAG = this.getClass().getSimpleName(); + } + + @Override + public void update(Context context) { + SharedPreferences prefs = Util.getPreferences(context); + boolean playNowAfter = prefs.getBoolean("playNowAfter", true); + + // Migrate the old preference so behavior stays the same + if(playNowAfter == false) { + SharedPreferences.Editor editor = prefs.edit(); + editor.putString(Constants.PREFERENCES_KEY_SONG_PRESS_ACTION, "single"); + editor.commit(); + } + } +} diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index c8c580ff..4109ea67 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -148,7 +148,8 @@ public final class Constants { public static final String PREFERENCES_KEY_BROWSE_TAGS = "browseTags"; public static final String PREFERENCES_KEY_OPEN_TO_TAB = "openToTab"; public static final String PREFERENCES_KEY_OVERRIDE_SYSTEM_LANGUAGE = "overrideSystemLanguage"; - public static final String PREFERENCES_KEY_PLAY_NOW_AFTER = "playNowAfter"; + // public static final String PREFERENCES_KEY_PLAY_NOW_AFTER = "playNowAfter"; + public static final String PREFERENCES_KEY_SONG_PRESS_ACTION = "songPressAction"; public static final String PREFERENCES_KEY_LARGE_ALBUM_ART = "largeAlbumArt"; public static final String PREFERENCES_KEY_ADMIN_ENABLED = "adminEnabled"; public static final String PREFERENCES_KEY_PLAYLIST_NAME = "suggestedPlaylistName"; diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java index e22b55f0..fc7292f6 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Util.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java @@ -705,6 +705,10 @@ public final class Util { return prefs.getBoolean(Constants.PREFERENCES_KEY_START_ON_HEADPHONES, false); } + public static String getSongPressAction(Context context) { + return getPreferences(context).getString(Constants.PREFERENCES_KEY_SONG_PRESS_ACTION, "all"); + } + /** * Get the contents of an <code>InputStream</code> as a <code>byte[]</code>. * <p/> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c31e045f..c43f3aea 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -397,8 +397,6 @@ <string name="settings.override_system_language">In Englisch anzeigen</string> <string name="settings.override_system_language_summary">Verwende Englisch anstatt Deutsch für DSub. Benötigt einen Neustart der App.</string> <string name="settings.drawer_items_title">Seitenmenü</string> - <string name="settings.play_now_after">Jetzt wiedergeben bis zum Listenende</string> - <string name="settings.play_now_after_summary">\"Jetzt wiedergeben\" im Kontextmenü spielt das ausgewählte Lied und alle in der Liste nachfolgenden Lieder ab (wie in der Web-Schnittstelle des Subsonic-Server)</string> <string name="settings.large_album_art">Große Cover anzeigen</string> <string name="settings.large_album_art_summary">Verwende große Cover zur Anzeige der Alben anstatt einer Liste</string> <string name="settings.admin_enabled">Administration aktiviert</string> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 9846dc17..a5273a50 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -386,8 +386,6 @@ <string name="settings.override_system_language">Sobreescribir idioma del sistema</string> <string name="settings.override_system_language_summary">Mostrar la aplicación en inglés aún teniendo disponible DSub en el idioma del sistema. Probablemente necesite borrar la aplicación de la memoria para efectuar los cambios.</string> <string name="settings.drawer_items_title">Pestañas</string> - <string name="settings.play_now_after">Reproducir ahora - Después</string> - <string name="settings.play_now_after_summary">Pulsar "Reproducir ahora" desde el menú contextual actúa como la interfaz web de Subsonic, reproduciendo todos los items a partir del seleccionado</string> <string name="settings.large_album_art">Carátulas grandes</string> <string name="settings.large_album_art_summary">Mostrar los discos con carátulas grandes en vez de en lista</string> <string name="settings.admin_enabled">Admin Habilitado</string> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 6b1089c6..a20c0fd8 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -398,8 +398,6 @@ <string name="settings.override_system_language">Ne pas utiliser la langue du système</string> <string name="settings.override_system_language_summary">Afficher DSub en Anglais même si une traduction existe pour la langue système. Peut nécessiter un vidage du cache de l\'application.</string> <string name="settings.drawer_items_title">Entrées de menu</string> - <string name="settings.play_now_after">Jouer maintenant - Plus tard</string> - <string name="settings.play_now_after_summary">Play Now context menu for a song plays everything after selected item (like the Subsonic web GUI)</string> <string name="settings.large_album_art">Pochettes larges</string> <string name="settings.large_album_art_summary">Afficher les pochettes en grand plutôt qu\'en liste.</string> <string name="settings.admin_enabled">Administration</string> diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 1e2a7c69..8ac830a7 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -442,8 +442,6 @@ <string name="settings.override_system_language">A rendszer nyelvének felülbírálása</string> <string name="settings.override_system_language_summary">A Dsub megjelenítése angol nyelven abban az esetben is, ha rendelkezik fordítással. Az alkalmazást törölni kell a memóriából, mert a beállítás csak újraindítás után lép érvénybe!</string> <string name="settings.drawer_items_title">Oldalsáv elemei</string> - <string name="settings.play_now_after">Lejátszás utána</string> - <string name="settings.play_now_after_summary">Egy helyi menü, amivel lehetővé válik minden dal lejátszása a kijelölt elem után (mint a Subsonic webes felületén)</string> <string name="settings.large_album_art">Nagyméretű albumborítók</string> <string name="settings.large_album_art_summary">Albumok megjelenítése rácsnézetben és nagyméretű albumborítóval a listanézet helyett.</string> <string name="settings.admin_enabled">Admin engedélyezése</string> diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 02f67538..93ff1f1d 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -431,8 +431,6 @@ <string name="settings.override_system_language">Systeemtaal overschrijven</string> <string name="settings.override_system_language_summary">Toon de app in Engels, ook als de systeemtaal voor Dsub beschikbaar is. Het is misschien nodig om de app uit cache geheugen te wissen voordat het effectief is.</string> <string name="settings.drawer_items_title">Server tabs</string> - <string name="settings.play_now_after">Speel af - na</string> - <string name="settings.play_now_after_summary">Nu afspelen contextmenu speelt alles af na het geselecteerde item (net zoals de Subsonic website)</string> <string name="settings.large_album_art">Grote albumhoezen</string> <string name="settings.large_album_art_summary">Toon albums met grote hoes in plaats van een lijst</string> <string name="settings.admin_enabled">Beheer ingeschakeld</string> diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 6cf7a8d6..9042839f 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -441,8 +441,6 @@ <string name="settings.override_system_language">Sobrepor linguagem do sistema</string> <string name="settings.override_system_language_summary">Mostrar a aplicação em inglês mesmo se o DSub tiver uma tradução disponível para a linguagem do sistema. Poderá ser necessário limpar a aplicação da memória para as alterações terem efeito</string> <string name="settings.drawer_items_title">Separadores laterais</string> - <string name="settings.play_now_after">Premir uma música - Reproduzir tudo</string> - <string name="settings.play_now_after_summary">Premir uma música adiciona à fila \"Reproduzir agora\" todas as músicas do álbum a seguir à música selecionada</string> <string name="settings.large_album_art">Grandes capas de álbum</string> <string name="settings.large_album_art_summary">Mostrar os álbuns com uma grande capa em vez de em lista</string> <string name="settings.admin_enabled">Ativar administração</string> diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 539775b5..ac219530 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -430,8 +430,6 @@ <string name="settings.override_system_language">Ignorera systemspråket</string> <string name="settings.override_system_language_summary">Visa appen på engelska även om systemet är på ett språk Subsonic har stöd för. Du kan eventuellt behöva rensa appen från minnet för att det ska ta effekt.</string> <string name="settings.drawer_items_title">Sidoflikar</string> - <string name="settings.play_now_after">Spela nu - Efter</string> - <string name="settings.play_now_after_summary">Spela nu i context menyn spelar allt efter spåret (som i Subsonic webb GUI)</string> <string name="settings.large_album_art">Stora album bilder</string> <string name="settings.large_album_art_summary">Visa album med stora bilder istället för en lista</string> <string name="settings.admin_enabled">Admin aktiverad</string> diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 3ee60fce..01296e9e 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -222,4 +222,17 @@ <item>@string/main.online</item> <item>@string/main.offline</item> </string-array> + + <string-array name="songPressActionValues"> + <item>single</item> + <item>all</item> + <item>next</item> + <item>last</item> + </string-array> + <string-array name="songPressActionNames"> + <item>@string/settings.song_press_play_single</item> + <item>@string/settings.song_press_play_all</item> + <item>@string/settings.song_press_play_next</item> + <item>@string/settings.song_press_play_last</item> + </string-array> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6837a88b..d372940f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -447,8 +447,11 @@ <string name="settings.override_system_language">Override System Language</string> <string name="settings.override_system_language_summary">Display app in english even if the system language is something DSub has a translation for. May need to clear the app from memory for changes to take affect.</string> <string name="settings.drawer_items_title">Drawer Tabs</string> - <string name="settings.play_now_after">Song Press - Play All</string> - <string name="settings.play_now_after_summary">Pressing on a song adds everything in the album to the Now Playing Queue after the pressed song</string> + <string name="settings.song_press_action">Song Press Action</string> + <string name="settings.song_press_play_single">Play only that song</string> + <string name="settings.song_press_play_all">Adds everything in the album to the Now Playing Queue</string> + <string name="settings.song_press_play_next">Adds song as next song</string> + <string name="settings.song_press_play_last">Adds song to end of Now Playing Queue</string> <string name="settings.large_album_art">Large Album Art</string> <string name="settings.large_album_art_summary">Display albums with large album art instead of in a list</string> <string name="settings.admin_enabled">Admin Enabled</string> diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index 91b0435b..566a8218 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -46,11 +46,12 @@ android:key="headsUpNotification" android:defaultValue="false"/> - <CheckBoxPreference - android:title="@string/settings.play_now_after" - android:summary="@string/settings.play_now_after_summary" - android:key="playNowAfter" - android:defaultValue="true"/> + <ListPreference + android:title="@string/settings.song_press_action" + android:key="songPressAction" + android:defaultValue="all" + android:entryValues="@array/songPressActionValues" + android:entries="@array/songPressActionNames"/> </PreferenceCategory> <PreferenceCategory |