diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-26 14:37:14 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-26 14:37:14 -0800 |
commit | 43521d6f328d91d6850618d35cd3b4a4eae695cc (patch) | |
tree | 21b2170750a249c20416b13443519b50daec7409 | |
parent | 35994d9f77fe186c7f26fe1cdf2870154d4482af (diff) | |
download | dsub-43521d6f328d91d6850618d35cd3b4a4eae695cc.tar.gz dsub-43521d6f328d91d6850618d35cd3b4a4eae695cc.tar.bz2 dsub-43521d6f328d91d6850618d35cd3b4a4eae695cc.zip |
#295 Fix playlists not saving if cache location changed
-rw-r--r-- | src/github/daneren2005/dsub/service/CachedMusicService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java index 06dd70f8..e240c043 100644 --- a/src/github/daneren2005/dsub/service/CachedMusicService.java +++ b/src/github/daneren2005/dsub/service/CachedMusicService.java @@ -196,8 +196,8 @@ public class CachedMusicService implements MusicService { dir = musicService.getPlaylist(refresh, id, name, context, progressListener); FileUtil.serialize(context, dir, getCacheName(context, "playlist", id)); - if(cachedPlaylist == null || !cachedPlaylist.getChildren().equals(dir.getChildren())) { - File playlistFile = FileUtil.getPlaylistFile(context, Util.getServerName(context, musicService.getInstance(context)), name); + File playlistFile = FileUtil.getPlaylistFile(context, Util.getServerName(context, musicService.getInstance(context)), name); + if(cachedPlaylist == null || !playlistFile.exists() || !cachedPlaylist.getChildren().equals(dir.getChildren())) { FileUtil.writePlaylistFile(context, playlistFile, dir); } } |