diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-25 22:13:09 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-25 22:13:09 -0800 |
commit | 35994d9f77fe186c7f26fe1cdf2870154d4482af (patch) | |
tree | 403c266d0473fac10170627260dc041d0186e3c8 | |
parent | dd4e9fd42e189614262fe5449ffc65ce6269d45c (diff) | |
download | dsub-35994d9f77fe186c7f26fe1cdf2870154d4482af.tar.gz dsub-35994d9f77fe186c7f26fe1cdf2870154d4482af.tar.bz2 dsub-35994d9f77fe186c7f26fe1cdf2870154d4482af.zip |
#294 Fix
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/CacheCleaner.java | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/FileUtil.java | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 7e047a94..a1fd04f9 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -35,6 +35,7 @@ import android.view.View; import android.widget.ImageButton;
import android.widget.TextView;
+import java.io.File;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
diff --git a/src/github/daneren2005/dsub/util/CacheCleaner.java b/src/github/daneren2005/dsub/util/CacheCleaner.java index e94d4a17..dc38140f 100644 --- a/src/github/daneren2005/dsub/util/CacheCleaner.java +++ b/src/github/daneren2005/dsub/util/CacheCleaner.java @@ -52,7 +52,7 @@ public class CacheCleaner { File[] children = dir.listFiles(); // No songs left in the folder - if(children.length == 1 && children[0].getPath().equals(FileUtil.getAlbumArtFile(context, dir).getPath())) { + if(children.length == 1 && children[0].getPath().equals(FileUtil.getAlbumArtFile(dir).getPath())) { Util.delete(children[0]); children = dir.listFiles(); } diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java index 572ef639..95917429 100644 --- a/src/github/daneren2005/dsub/util/FileUtil.java +++ b/src/github/daneren2005/dsub/util/FileUtil.java @@ -314,7 +314,7 @@ public class FileUtil { public static File getMusicDirectory(Context context) { String path = Util.getPreferences(context).getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, getDefaultMusicDirectory(context).getPath()); File dir = new File(path); - return ensureDirectoryExistsAndIsReadWritable(dir) ? dir : getDefaultMusicDirectory(); + return ensureDirectoryExistsAndIsReadWritable(dir) ? dir : getDefaultMusicDirectory(context); } public static boolean deleteMusicDirectory(Context context) { File musicDirectory = FileUtil.getMusicDirectory(context); |