Skip to content

Commit 4826e5b

Browse files
committed
Add missing annotations for columnInfo in PlaylistDuplicatesEntry
Fixes [ksp] app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.kt:140: The columns returned by the query does not have the fields [thumbnailUrl,isThumbnailPermanent,thumbnailStreamId,displayIndex,orderingName] in org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry even though they are annotated as non-null or primitive. Columns returned by the query: [uid,streamCount,timesStreamIsContained] Signed-off-by: Aayush Gupta <[email protected]>
1 parent 97e7272 commit 4826e5b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package org.schabi.newpipe.database.playlist
88

99
import androidx.room.ColumnInfo
10+
import org.schabi.newpipe.database.playlist.model.PlaylistEntity
1011

1112
/**
1213
* This class adds a field to [PlaylistMetadataEntry] that contains an integer representing
@@ -15,12 +16,25 @@ import androidx.room.ColumnInfo
1516
* @see org.schabi.newpipe.local.playlist.LocalPlaylistManager.getPlaylistDuplicates
1617
*/
1718
data class PlaylistDuplicatesEntry(
19+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_ID)
1820
override val uid: Long,
21+
22+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_URL)
1923
override val thumbnailUrl: String?,
24+
25+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_PERMANENT)
2026
override val isThumbnailPermanent: Boolean?,
27+
28+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_STREAM_ID)
2129
override val thumbnailStreamId: Long?,
30+
31+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_DISPLAY_INDEX)
2232
override var displayIndex: Long?,
33+
34+
@ColumnInfo(name = PLAYLIST_STREAM_COUNT)
2335
override val streamCount: Long,
36+
37+
@ColumnInfo(name = PlaylistEntity.PLAYLIST_NAME)
2438
override val orderingName: String?,
2539

2640
@ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ interface PlaylistStreamDAO : BasicDAO<PlaylistStreamEntity> {
103103
)
104104
fun getStreamsWithoutDuplicates(playlistId: Long): Flowable<MutableList<PlaylistStreamEntry>>
105105

106-
@RewriteQueriesToDropUnusedColumns
107106
@Transaction
108107
@Query(
109108
"""

0 commit comments

Comments
 (0)