From 7b1f3c6de11ac000a37d029c8c29086eff08fe1b Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Wed, 16 Oct 2013 09:59:00 -0700 Subject: When starring songs, clear parent directory cache --- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index b6b57a44..aa1d66ed 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -512,6 +512,12 @@ public class SubsonicFragment extends Fragment { protected Void doInBackground() throws Throwable { MusicService musicService = MusicServiceFactory.getMusicService(context); musicService.setStarred(entry.getId(), starred, context, null); + + // Make sure to clear parent cache + String s = Util.getRestUrl(context, null) + entry.getParentId(); + String parentCache = "directory-" + s.hashCode() + ".ser"; + File file = new File(context.getCacheDir(), parentCache); + file.delete(); return null; } -- cgit v1.2.3