aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-12-14 18:02:51 -0800
committerScott Jackson <daneren2005@gmail.com>2015-12-14 18:02:51 -0800
commit6cfb5f49d7d04e85dcb9489bfc5d3516e2250a27 (patch)
tree08fd9ca5dbb201585c253c99ed1e4e8fa6d8162b
parent816c72f0f0005e8d5395742894efc7c60d15c87a (diff)
downloaddsub-6cfb5f49d7d04e85dcb9489bfc5d3516e2250a27.tar.gz
dsub-6cfb5f49d7d04e85dcb9489bfc5d3516e2250a27.tar.bz2
dsub-6cfb5f49d7d04e85dcb9489bfc5d3516e2250a27.zip
Don't create DownloadFile just to grab the save path
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java b/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
index 08f6f461..8d91a251 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
@@ -175,7 +175,7 @@ public class SongDBHandler extends SQLiteOpenHelper {
}
public synchronized Pair<Integer, String> getOnlineSongId(MusicDirectory.Entry entry) {
- return getOnlineSongId(new DownloadFile(context, entry, true));
+ return getOnlineSongId(Util.getRestUrlHash(context), entry.getId(), FileUtil.getSongFile(context, entry).getAbsolutePath(), Util.isOffline(context) ? false : true);
}
public synchronized Pair<Integer, String> getOnlineSongId(DownloadFile downloadFile) {
return getOnlineSongId(Util.getRestUrlHash(context), downloadFile.getSong().getId(), downloadFile.getSaveFile().getAbsolutePath(), Util.isOffline(context) ? false : true);