[Android] Audio browser: fix the media deletion
Adrien Maglo
git at videolan.org
Fri Feb 21 15:59:43 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Feb 21 15:59:35 2014 +0100| [4649b8f7f4c0826d20883a389ac111540a27478d] | committer: Adrien Maglo
Audio browser: fix the media deletion
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4649b8f7f4c0826d20883a389ac111540a27478d
---
.../src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java | 4 ++--
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index 9f54782..05e4afa 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -258,8 +258,8 @@ public class AudioAlbumsSongsFragment extends SherlockFragment {
new VlcRunnable(mSongsAdapter.getItem(groupPosition)) {
@Override
public void run(Object o) {
- Media aMedia = (Media) o;
- mMediaLibrary.getMediaItems().remove(aMedia);
+ AudioBrowserListAdapter.ListItem listItem = (AudioBrowserListAdapter.ListItem)o;
+ mMediaLibrary.getMediaItems().remove(listItem.mMediaList.get(0));
updateList();
}
});
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index fd7f3c4..d2cf125 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -254,8 +254,8 @@ public class AudioBrowserFragment extends SherlockFragment {
new VlcRunnable(mSongsAdapter.getItem(groupPosition)) {
@Override
public void run(Object o) {
- Media aMedia = (Media) o;
- mMediaLibrary.getMediaItems().remove(aMedia);
+ AudioBrowserListAdapter.ListItem listItem = (AudioBrowserListAdapter.ListItem)o;
+ mMediaLibrary.getMediaItems().remove(listItem.mMediaList.get(0));
updateLists();
}
});
More information about the Android
mailing list