From 6cfb5f49d7d04e85dcb9489bfc5d3516e2250a27 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 14 Dec 2015 18:02:51 -0800 Subject: Don't create DownloadFile just to grab the save path --- app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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 getOnlineSongId(DownloadFile downloadFile) { return getOnlineSongId(Util.getRestUrlHash(context), downloadFile.getSong().getId(), downloadFile.getSaveFile().getAbsolutePath(), Util.isOffline(context) ? false : true); -- cgit v1.2.3