aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-13 14:24:06 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-13 14:24:06 -0700
commitdfc06a4cbd2319cca8141159ac5a14b43854c0cd (patch)
treec393066ec23abac80312b54855d0599b96b6b300 /src
parentf43aca1ad97f99f7f7e76041e7b3dac661c13afb (diff)
downloaddsub-dfc06a4cbd2319cca8141159ac5a14b43854c0cd.tar.gz
dsub-dfc06a4cbd2319cca8141159ac5a14b43854c0cd.tar.bz2
dsub-dfc06a4cbd2319cca8141159ac5a14b43854c0cd.zip
Fix setStarred looking up wrong serialization with tags on
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/CachedMusicService.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java
index 6c4822fb..6ba5dc02 100644
--- a/src/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/src/github/daneren2005/dsub/service/CachedMusicService.java
@@ -453,8 +453,22 @@ public class CachedMusicService implements MusicService {
// If parents is null, or artist id's are set, then we are looking at artists
if(parents != null && (artistId == null || artistId.size() == 0)) {
+ String cacheName;
+
+ // If using tag browsing, need to do lookup off of different criteria
+ if(Util.isTagBrowsing(context, musicService.getInstance(context))) {
+ // If using id's, we are starring songs and need to use album listings
+ if(id != null && id.size() > 0) {
+ cacheName = "album";
+ } else {
+ cacheName = "artist";
+ }
+ } else {
+ cacheName = "directory";
+ }
+
for (String parent : parents) {
- new MusicDirectoryUpdater(context, "directory", parent) {
+ new MusicDirectoryUpdater(context, cacheName, parent) {
@Override
public boolean checkResult(Entry check) {
for (String id : checkIds) {
@@ -468,7 +482,6 @@ public class CachedMusicService implements MusicService {
@Override
public void updateResult(List<Entry> objects, Entry result) {
- Log.d(TAG, result.getId());
result.setStarred(starred);
}
}.execute();