From ff4dd4c28c280b8adff62c113ce0e6dc746ee1e4 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 21 Jan 2016 18:09:33 -0800 Subject: Change song clicking to add stuff before it as well --- .../daneren2005/dsub/fragments/SelectDirectoryFragment.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/src/main') 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 0b436218..ba0886c4 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -388,18 +388,16 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section List songs = new ArrayList(); if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PLAY_NOW_AFTER, true) && albumListType == null) { - Iterator it = entries.listIterator(entries.indexOf(entry)); - while(it.hasNext()) { - Entry song = (Entry) it.next(); - if(!song.isDirectory()) { + for(Entry song: entries) { + if(!song.isDirectory() && !song.isVideo()) { songs.add(song); } } + playNow(songs, entry, 0); } else { songs.add(entry); + playNow(songs); } - - playNow(songs); } } -- cgit v1.2.3