diff options
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(); } |