From 6aaf10697c525f935ff3c7aa35c2be2bd15afeb3 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 16 Dec 2013 21:50:54 -0800 Subject: #223 Clear cache when modifying playlist --- src/github/daneren2005/dsub/service/CachedMusicService.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/github') 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 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 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 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); } -- cgit v1.2.3