Started working on a way to show that items are already in a playlist

This commit is contained in:
Jared Fantaye 2022-12-10 13:15:49 +01:00 committed by Stypox
parent 2caccef5cd
commit 40522dbebf
5 changed files with 66 additions and 1 deletions

View file

@ -59,6 +59,14 @@ public interface PlaylistStreamDAO extends BasicDAO<PlaylistStreamEntity> {
)
Flowable<Integer> getDuplicates(long playlistId, String streamURL);
@Query("SELECT " + JOIN_PLAYLIST_ID
+ " FROM " + STREAM_TABLE
+ " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE
+ " ON " + STREAM_ID + " = " + JOIN_STREAM_ID
+ " WHERE " + STREAM_URL + " = :streamURL"
)
Flowable<List<Long>> getDuplicatePlaylists(String streamURL);
@Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)"
+ " FROM " + PLAYLIST_STREAM_JOIN_TABLE