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 f5a1f915be
commit 8b6e110635
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
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")