From 5d3955854ef5e09f83b1103d7dd07670933ad498 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Sun, 5 Feb 2023 21:21:02 +0100 Subject: [PATCH] Fixed the merge conflict --- .../database/playlist/dao/PlaylistStreamDAO.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index 459959d99..2915e7bd3 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -110,8 +110,15 @@ public interface PlaylistStreamDAO extends BasicDAO { @Transaction @Query("SELECT " + PLAYLIST_TABLE + "." + PLAYLIST_ID + ", " + PLAYLIST_NAME + ", " - + PLAYLIST_TABLE + "." + PLAYLIST_THUMBNAIL_URL + ", " - + "COALESCE(COUNT(" + JOIN_PLAYLIST_ID + "), 0) AS " + PLAYLIST_STREAM_COUNT + ", " + + + " CASE WHEN " + PLAYLIST_THUMBNAIL_STREAM_ID + " = -1" + + " THEN " + "'" + DEFAULT_THUMBNAIL + "'" + + " ELSE (SELECT " + STREAM_THUMBNAIL_URL + + " FROM " + STREAM_TABLE + + " WHERE " + STREAM_TABLE + "." + STREAM_ID + " = " + PLAYLIST_THUMBNAIL_STREAM_ID + + " ) END AS " + PLAYLIST_THUMBNAIL_URL + + + ", COALESCE(COUNT(" + JOIN_PLAYLIST_ID + "), 0) AS " + PLAYLIST_STREAM_COUNT + ", " + "COALESCE(SUM(" + STREAM_URL + " = :streamUrl), 0) AS " + PLAYLIST_TIMES_STREAM_IS_CONTAINED