Skip to content

Commit 5d39558

Browse files
committed
Fixed the merge conflict
1 parent 3ff4b71 commit 5d39558

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,15 @@ default Flowable<List<PlaylistStreamEntity>> listByService(final int serviceId)
110110
@Transaction
111111
@Query("SELECT " + PLAYLIST_TABLE + "." + PLAYLIST_ID + ", "
112112
+ PLAYLIST_NAME + ", "
113-
+ PLAYLIST_TABLE + "." + PLAYLIST_THUMBNAIL_URL + ", "
114-
+ "COALESCE(COUNT(" + JOIN_PLAYLIST_ID + "), 0) AS " + PLAYLIST_STREAM_COUNT + ", "
113+
114+
+ " CASE WHEN " + PLAYLIST_THUMBNAIL_STREAM_ID + " = -1"
115+
+ " THEN " + "'" + DEFAULT_THUMBNAIL + "'"
116+
+ " ELSE (SELECT " + STREAM_THUMBNAIL_URL
117+
+ " FROM " + STREAM_TABLE
118+
+ " WHERE " + STREAM_TABLE + "." + STREAM_ID + " = " + PLAYLIST_THUMBNAIL_STREAM_ID
119+
+ " ) END AS " + PLAYLIST_THUMBNAIL_URL
120+
121+
+ ", COALESCE(COUNT(" + JOIN_PLAYLIST_ID + "), 0) AS " + PLAYLIST_STREAM_COUNT + ", "
115122
+ "COALESCE(SUM(" + STREAM_URL + " = :streamUrl), 0) AS "
116123
+ PLAYLIST_TIMES_STREAM_IS_CONTAINED
117124

0 commit comments

Comments
 (0)