Add "Add to queue" menu button to Playlist Page #2

Merged
teier merged 1 commits from add-playlist-to-queue-menu-button into main 2025-12-07 20:20:10 +00:00
3 changed files with 20 additions and 7 deletions
Showing only changes of commit 2a18f86051 - Show all commits

View File

@@ -140,6 +140,11 @@ public class PlaylistPageFragment extends Fragment implements ClickCallback {
} }
}); });
return true; return true;
} else if (item.getItemId() == R.id.action_add_to_queue) {
playlistPageViewModel.getPlaylistSongLiveList().observe(getViewLifecycleOwner(), songs -> {
MediaManager.enqueue(mediaBrowserListenableFuture, songs, false);
});
return true;
} else if (item.getItemId() == R.id.action_pin_playlist) { } else if (item.getItemId() == R.id.action_pin_playlist) {
playlistPageViewModel.setPinned(true); playlistPageViewModel.setPinned(true);
return true; return true;

View File

@@ -13,6 +13,13 @@
android:icon="@drawable/ic_file_download" android:icon="@drawable/ic_file_download"
android:title="@string/menu_download_all_button" android:title="@string/menu_download_all_button"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/action_add_to_queue"
android:icon="@drawable/ic_add"
android:title="@string/menu_add_to_queue_button"
app:showAsAction="never" />
<item <item
android:id="@+id/action_pin_playlist" android:id="@+id/action_pin_playlist"
android:icon="@drawable/ic_add" android:icon="@drawable/ic_add"

View File

@@ -157,6 +157,7 @@
<string name="login_title">Subsonic servers</string> <string name="login_title">Subsonic servers</string>
<string name="login_title_expanded">Subsonic servers</string> <string name="login_title_expanded">Subsonic servers</string>
<string name="media_route_menu_title">Cast</string> <string name="media_route_menu_title">Cast</string>
<string name="menu_add_to_queue_button">Add to queue</string>
<string name="menu_add_button">Add</string> <string name="menu_add_button">Add</string>
<string name="menu_download_all_button">Download all</string> <string name="menu_download_all_button">Download all</string>
<string name="menu_download_label">Download</string> <string name="menu_download_label">Download</string>