diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-12-16 21:50:54 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-12-16 21:50:54 -0800 |
commit | 6aaf10697c525f935ff3c7aa35c2be2bd15afeb3 (patch) | |
tree | e7468271527cecf28c59a3fc7d83c2c79807f7b3 /src/github | |
parent | 58e89ac1ca77b43695dbcb12f7c6b8b326e906d9 (diff) | |
download | dsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.tar.gz dsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.tar.bz2 dsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.zip |
#223 Clear cache when modifying playlist
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/CachedMusicService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java index 4d7ddb7e..3704d012 100644 --- a/src/github/daneren2005/dsub/service/CachedMusicService.java +++ b/src/github/daneren2005/dsub/service/CachedMusicService.java @@ -198,21 +198,25 @@ public class CachedMusicService implements MusicService { @Override public void addToPlaylist(String id, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception { + Util.delete(new File(context.getCacheDir(), getCacheName(context, "playlist", id))); musicService.addToPlaylist(id, toAdd, context, progressListener); } @Override public void removeFromPlaylist(String id, List<Integer> toRemove, Context context, ProgressListener progressListener) throws Exception { + Util.delete(new File(context.getCacheDir(), getCacheName(context, "playlist", id))); musicService.removeFromPlaylist(id, toRemove, context, progressListener); } @Override public void overwritePlaylist(String id, String name, int toRemove, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception { + Util.delete(new File(context.getCacheDir(), getCacheName(context, "playlist", id))); musicService.overwritePlaylist(id, name, toRemove, toAdd, context, progressListener); } @Override public void updatePlaylist(String id, String name, String comment, boolean pub, Context context, ProgressListener progressListener) throws Exception { + Util.delete(new File(context.getCacheDir(), getCacheName(context, "playlist", id))); musicService.updatePlaylist(id, name, comment, pub, context, progressListener); } |