The last element listened to is the first in the list at the next start

This commit is contained in:
CappielloAntonio 2021-12-30 20:07:20 +01:00
parent 9328ec87ab
commit 15e7c28b14
4 changed files with 59 additions and 3 deletions

View file

@ -36,4 +36,7 @@ public interface QueueDao {
@Query("UPDATE queue SET last_play=:timestamp WHERE id=:id")
void setLastPlay(String id, long timestamp);
@Query("SELECT track_order FROM queue ORDER BY last_play DESC LIMIT 1")
int getLastPlay();
}