aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-12-16 21:50:54 -0800
committerScott Jackson <daneren2005@gmail.com>2013-12-16 21:50:54 -0800
commit6aaf10697c525f935ff3c7aa35c2be2bd15afeb3 (patch)
treee7468271527cecf28c59a3fc7d83c2c79807f7b3 /src/github/daneren2005
parent58e89ac1ca77b43695dbcb12f7c6b8b326e906d9 (diff)
downloaddsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.tar.gz
dsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.tar.bz2
dsub-6aaf10697c525f935ff3c7aa35c2be2bd15afeb3.zip
#223 Clear cache when modifying playlist
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/service/CachedMusicService.java4
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);
}