From d74b188f3cf3a5e76905716497e0a6a9482f95f3 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sun, 31 Aug 2014 09:16:33 -0700 Subject: More improvements to GenericSongUpdater for tag browsing --- .../daneren2005/dsub/service/CachedMusicService.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java index e4a11f9c..be788596 100644 --- a/src/github/daneren2005/dsub/service/CachedMusicService.java +++ b/src/github/daneren2005/dsub/service/CachedMusicService.java @@ -1244,19 +1244,22 @@ public class CachedMusicService implements MusicService { public abstract void updateResult(Entry result); public void execute() { - String cacheName; + String cacheName, parent; if(Util.isTagBrowsing(context, musicService.getInstance(context))) { - // If using id's, we are starring songs and need to use album listings - if(entry.isAlbum()) { - cacheName = "album"; - } else { + // If starring album, needs to reference artist instead + if(entry.isDirectory()) { cacheName = "artist"; + parent = entry.getArtistId(); + } else { + cacheName = "album"; + parent = entry.getAlbumId(); } } else { cacheName = "directory"; + parent = entry.getParent(); } - new MusicDirectoryUpdater(context, cacheName, entry.getParent()) { + new MusicDirectoryUpdater(context, cacheName, parent) { @Override public boolean checkResult(Entry check) { return GenericSongUpdater.this.checkResult(check); -- cgit v1.2.3