Commit 96546491 authored by Adrien Maglo's avatar Adrien Maglo

Audio browser: add all the medias of the song panel to the playlist when the...

Audio browser: add all the medias of the song panel to the playlist when the function is selected from the context menu
parent 85845985
......@@ -167,9 +167,8 @@ public class AudioBrowserFragment extends SherlockFragment {
OnItemClickListener songListener = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> av, View v, int p, long id) {
ArrayList<String> songList = new ArrayList<String>();
int selectedId = mSongsAdapter.getListWithPosition(songList, p);
mAudioController.load(songList, selectedId);
ArrayList<String> mediaLocation = mSongsAdapter.getLocations(p);
mAudioController.load(mediaLocation, 0);
}
};
......@@ -270,9 +269,8 @@ public class AudioBrowserFragment extends SherlockFragment {
}
if (useAllItems) {
startPosition = groupPosition;
medias = mSongsAdapter.getLocations(groupPosition);
medias = new ArrayList<String>();
startPosition = mSongsAdapter.getListWithPosition(medias, groupPosition);
}
else {
startPosition = 0;
......
......@@ -22,6 +22,7 @@ package org.videolan.vlc.gui.audio;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.videolan.vlc.BitmapCache;
......@@ -333,7 +334,7 @@ public class AudioBrowserListAdapter extends BaseAdapter {
* @param position Position to retrieve in to _this_ adapter.
* @return The position of 'position' in the new single list, or 0 if not found.
*/
public int getListWithPosition(ArrayList<String> outputList, int position) {
public int getListWithPosition(List<String> outputList, int position) {
int outputPosition = 0;
outputList.clear();
for(int i = 0; i < mItems.size(); i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment