aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-10-16 09:59:00 -0700
committerdaneren2005 <daneren2005@gmail.com>2013-10-16 09:59:00 -0700
commit7b1f3c6de11ac000a37d029c8c29086eff08fe1b (patch)
treec09b319405a58d950c974840cd362886fed69a0d /src
parent58f93512e28e4e84125eff0ab4c7a3ca2cb7d4ce (diff)
downloaddsub-7b1f3c6de11ac000a37d029c8c29086eff08fe1b.tar.gz
dsub-7b1f3c6de11ac000a37d029c8c29086eff08fe1b.tar.bz2
dsub-7b1f3c6de11ac000a37d029c8c29086eff08fe1b.zip
When starring songs, clear parent directory cache
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java6
1 files changed, 6 insertions, 0 deletions
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;
}