From f78f88c0ba42c8ebe5e0db1c22dc43b2a872e66d Mon Sep 17 00:00:00 2001 From: owner Date: Thu, 12 Jul 2012 13:47:03 -0700 Subject: Delete Song option under Now Playing long press menu (removes from cache) --- subsonic-android/res/menu/nowplaying_context.xml | 5 +++++ subsonic-android/res/values/strings.xml | 1 + .../github/daneren2005/subphonic/activity/DownloadActivity.java | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/subsonic-android/res/menu/nowplaying_context.xml b/subsonic-android/res/menu/nowplaying_context.xml index 16fb47d7..04e56e1a 100644 --- a/subsonic-android/res/menu/nowplaying_context.xml +++ b/subsonic-android/res/menu/nowplaying_context.xml @@ -15,6 +15,11 @@ android:id="@+id/menu_remove" android:title="@string/download.menu_remove" /> + + Show album Lyrics Remove song + Delete song Remove all Screen on Screen off diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/DownloadActivity.java index 3c2d7b04..80c264f5 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/DownloadActivity.java @@ -74,6 +74,7 @@ import github.daneren2005.subphonic.util.Util; import github.daneren2005.subphonic.view.VisualizerView; import static github.daneren2005.subphonic.domain.PlayerState.*; +import java.util.ArrayList; public class DownloadActivity extends SubsonicTabActivity implements OnGestureListener { @@ -556,6 +557,13 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi getDownloadService().remove(song); onDownloadListChanged(); return true; + case R.id.menu_delete: + getDownloadService().remove(song); + List songs = new ArrayList(1); + songs.add(song.getSong()); + getDownloadService().delete(songs); + onDownloadListChanged(); + return true; case R.id.menu_remove_all: getDownloadService().setShufflePlayEnabled(false); getDownloadService().clear(); -- cgit v1.2.3