File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
app/src/main/java/org/schabi/newpipe/database/playlist/dao Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ interface PlaylistStreamDAO : BasicDAO<PlaylistStreamEntity> {
6868 )
6969 fun getOrderedStreamsOf (playlistId : Long ): Flowable <MutableList <PlaylistStreamEntry >>
7070
71+ // If a playlist has no streams, there won’t be any rows in the **playlist_stream_join** table
72+ // that have a foreign key to that playlist. Thus, the **playlist_id** will not have a
73+ // corresponding value in any rows of the join table. So, if you group by the **playlist_id**,
74+ // only playlists that contain videos are grouped and displayed. Look at #9642 #13055
75+
7176 @Transaction
7277 @Query(
7378 """
@@ -103,6 +108,11 @@ interface PlaylistStreamDAO : BasicDAO<PlaylistStreamEntity> {
103108 )
104109 fun getStreamsWithoutDuplicates (playlistId : Long ): Flowable <MutableList <PlaylistStreamEntry >>
105110
111+ // If a playlist has no streams, there won’t be any rows in the **playlist_stream_join** table
112+ // that have a foreign key to that playlist. Thus, the **playlist_id** will not have a
113+ // corresponding value in any rows of the join table. So, if you group by the **playlist_id**,
114+ // only playlists that contain videos are grouped and displayed. Look at #9642 #13055
115+
106116 @Transaction
107117 @Query(
108118 """
@@ -118,7 +128,7 @@ interface PlaylistStreamDAO : BasicDAO<PlaylistStreamEntity> {
118128 LEFT JOIN streams
119129 ON streams.uid = stream_id AND :streamUrl = :streamUrl
120130
121- GROUP BY playlist_id
131+ GROUP BY playlists.uid
122132 ORDER BY display_index, name
123133 """
124134 )
You can’t perform that action at this time.
0 commit comments