diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-09 20:19:58 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-09 20:19:58 -0700 |
commit | c1b1315bc22f6793cf5c0f4d083937f5bca0232f (patch) | |
tree | 9b7ed2e6ed2b85fd833afd7eb2c339bccebc2e4c | |
parent | 3e17a9acf59573d8ee587d4cb50fd662df2f0202 (diff) | |
download | dsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.tar.gz dsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.tar.bz2 dsub-c1b1315bc22f6793cf5c0f4d083937f5bca0232f.zip |
Use a different album art for playlists each time
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 2 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 2 |
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) {
|