From 4826e5b3c5ebf52b80f4970ba73db7d9d1f3d771 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Thu, 6 Nov 2025 16:08:40 +0800 Subject: [PATCH] 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 --- .../database/playlist/PlaylistDuplicatesEntry.kt | 14 ++++++++++++++ .../database/playlist/dao/PlaylistStreamDAO.kt | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.kt b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.kt index f0447df6e..84972a89e 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.kt +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.kt @@ -7,6 +7,7 @@ package org.schabi.newpipe.database.playlist import androidx.room.ColumnInfo +import org.schabi.newpipe.database.playlist.model.PlaylistEntity /** * This class adds a field to [PlaylistMetadataEntry] that contains an integer representing @@ -15,12 +16,25 @@ import androidx.room.ColumnInfo * @see org.schabi.newpipe.local.playlist.LocalPlaylistManager.getPlaylistDuplicates */ data class PlaylistDuplicatesEntry( + @ColumnInfo(name = PlaylistEntity.PLAYLIST_ID) override val uid: Long, + + @ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_URL) override val thumbnailUrl: String?, + + @ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_PERMANENT) override val isThumbnailPermanent: Boolean?, + + @ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_STREAM_ID) override val thumbnailStreamId: Long?, + + @ColumnInfo(name = PlaylistEntity.PLAYLIST_DISPLAY_INDEX) override var displayIndex: Long?, + + @ColumnInfo(name = PLAYLIST_STREAM_COUNT) override val streamCount: Long, + + @ColumnInfo(name = PlaylistEntity.PLAYLIST_NAME) override val orderingName: String?, @ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.kt b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.kt index 7edb15526..8bf26d754 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.kt @@ -103,7 +103,6 @@ interface PlaylistStreamDAO : BasicDAO { ) fun getStreamsWithoutDuplicates(playlistId: Long): Flowable> - @RewriteQueriesToDropUnusedColumns @Transaction @Query( """