Fixed the functionality, improved performance & general code cleanup

This commit is contained in:
Jared Fantaye 2022-12-12 20:12:06 +01:00 committed by Stypox
parent 8f38f02cd3
commit 7a3b3452c4
6 changed files with 60 additions and 48 deletions

View file

@ -57,7 +57,7 @@ public interface PlaylistStreamDAO extends BasicDAO<PlaylistStreamEntity> {
+ " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId "
+ " AND " + STREAM_URL + " = :streamURL"
)
Flowable<Integer> getDuplicates(long playlistId, String streamURL);
Flowable<Integer> getDuplicateCount(long playlistId, String streamURL);
@Query("SELECT " + JOIN_PLAYLIST_ID
+ " FROM " + STREAM_TABLE
@ -67,7 +67,6 @@ public interface PlaylistStreamDAO extends BasicDAO<PlaylistStreamEntity> {
)
Flowable<List<Long>> getDuplicatePlaylists(String streamURL);
@Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)"
+ " FROM " + PLAYLIST_STREAM_JOIN_TABLE
+ " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId")