aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java3
1 files changed, 1 insertions, 2 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 e7716b49..ba0851c2 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/SongDBHandler.java
@@ -116,7 +116,6 @@ public class SongDBHandler extends SQLiteOpenHelper {
}
public Long[] getLastPlayed(MusicDirectory.Entry entry) {
- // TODO: In case of offline want to get most recent played match
return getLastPlayed(getOnlineSongId(entry));
}
protected Long[] getLastPlayed(Pair<Integer, String> pair) {
@@ -171,7 +170,7 @@ public class SongDBHandler extends SQLiteOpenHelper {
SQLiteDatabase db = this.getReadableDatabase();
String[] columns = {SONGS_SERVER_KEY, SONGS_SERVER_ID};
- Cursor cursor = db.query(TABLE_SONGS, columns, SONGS_COMPLETE_PATH + " = ?", new String[] { path }, null, null, null, null);
+ Cursor cursor = db.query(TABLE_SONGS, columns, SONGS_COMPLETE_PATH + " = ?", new String[] { path }, null, null, SONGS_LAST_PLAYED + " DESC", null);
try {
cursor.moveToFirst();