feat: added "Recent songs" and "Random" menu items in Android Auto

This commit is contained in:
CappielloAntonio 2024-02-18 19:06:58 +01:00
parent 14d6128df0
commit 54e988b70e
3 changed files with 103 additions and 0 deletions

View file

@ -12,6 +12,9 @@ import java.util.List;
@Dao
public interface ChronologyDao {
@Query("SELECT * FROM chronology WHERE server == :server GROUP BY id ORDER BY timestamp DESC LIMIT :count")
LiveData<List<Chronology>> getLastPlayed(String server, int count);
@Query("SELECT * FROM chronology WHERE timestamp >= :startDate AND timestamp < :endDate AND server == :server GROUP BY id ORDER BY COUNT(id) DESC LIMIT 9")
LiveData<List<Chronology>> getAllFrom(long startDate, long endDate, String server);