aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-09 20:19:58 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-09 20:19:58 -0700
commitc1b1315bc22f6793cf5c0f4d083937f5bca0232f (patch)
tree9b7ed2e6ed2b85fd833afd7eb2c339bccebc2e4c /subsonic-android
parent3e17a9acf59573d8ee587d4cb50fd662df2f0202 (diff)
downloaddsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.tar.gz
dsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.tar.bz2
dsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.zip
Use a different album art for playlists each time
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 63c41546..192f5ea0 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -623,7 +623,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
View header = LayoutInflater.from(context).inflate(R.layout.select_album_header, entryList, false);
View coverArtView = header.findViewById(R.id.select_album_art);
- getImageLoader().loadImage(coverArtView, entries.get(0), true, true);
+ getImageLoader().loadImage(coverArtView, entries.get(random.nextInt(entries.size())), true, true);
TextView titleView = (TextView) header.findViewById(R.id.select_album_title);
if(playlistName != null) {
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 1284a99a..46e4f8c4 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -67,6 +67,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
+import java.util.Random;
public class SubsonicFragment extends SherlockFragment {
private static final String TAG = SubsonicFragment.class.getSimpleName();
@@ -75,6 +76,7 @@ public class SubsonicFragment extends SherlockFragment {
protected View rootView;
protected boolean primaryFragment = false;
protected boolean invalidated = false;
+ protected static Random random = new Random();
@Override
public void onCreate(Bundle bundle) {