diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-10-01 08:48:07 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-10-01 08:48:07 -0700 |
commit | 6b08efedf0f212e99b627ebf590fa014b955351a (patch) | |
tree | 4ded020a8455405360ed0fdaf627e654cb6cc5c7 /app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java | |
parent | 78c576aaeac4b42c717f8f5944c55888b8dac4a1 (diff) | |
download | dsub-6b08efedf0f212e99b627ebf590fa014b955351a.tar.gz dsub-6b08efedf0f212e99b627ebf590fa014b955351a.tar.bz2 dsub-6b08efedf0f212e99b627ebf590fa014b955351a.zip |
Add ability to star/rate albums in root folder
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java b/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java index f053c215..8a17d8f3 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java @@ -837,11 +837,21 @@ public class CachedMusicService implements MusicService { @Override public void setRating(final Entry entry, final int rating, Context context, ProgressListener progressListener) throws Exception { musicService.setRating(entry, rating, context, progressListener); - + new GenericEntryUpdater(context, entry) { @Override + public boolean checkResult(Entry entry, Entry check) { + if (entry.getId().equals(check.getId())) { + check.setRating(entry.getRating()); + return true; + } + + return false; + } + + @Override public void updateResult(Entry result) { - result.setRating(rating); + } }.execute(); } |