1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-11-12 05:03:00 +00:00

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 <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-11-06 16:08:40 +08:00
parent 97e7272151
commit 4826e5b3c5
2 changed files with 14 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
package org.schabi.newpipe.database.playlist package org.schabi.newpipe.database.playlist
import androidx.room.ColumnInfo import androidx.room.ColumnInfo
import org.schabi.newpipe.database.playlist.model.PlaylistEntity
/** /**
* This class adds a field to [PlaylistMetadataEntry] that contains an integer representing * 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 * @see org.schabi.newpipe.local.playlist.LocalPlaylistManager.getPlaylistDuplicates
*/ */
data class PlaylistDuplicatesEntry( data class PlaylistDuplicatesEntry(
@ColumnInfo(name = PlaylistEntity.PLAYLIST_ID)
override val uid: Long, override val uid: Long,
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_URL)
override val thumbnailUrl: String?, override val thumbnailUrl: String?,
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_PERMANENT)
override val isThumbnailPermanent: Boolean?, override val isThumbnailPermanent: Boolean?,
@ColumnInfo(name = PlaylistEntity.PLAYLIST_THUMBNAIL_STREAM_ID)
override val thumbnailStreamId: Long?, override val thumbnailStreamId: Long?,
@ColumnInfo(name = PlaylistEntity.PLAYLIST_DISPLAY_INDEX)
override var displayIndex: Long?, override var displayIndex: Long?,
@ColumnInfo(name = PLAYLIST_STREAM_COUNT)
override val streamCount: Long, override val streamCount: Long,
@ColumnInfo(name = PlaylistEntity.PLAYLIST_NAME)
override val orderingName: String?, override val orderingName: String?,
@ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED) @ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED)

View File

@@ -103,7 +103,6 @@ interface PlaylistStreamDAO : BasicDAO<PlaylistStreamEntity> {
) )
fun getStreamsWithoutDuplicates(playlistId: Long): Flowable<MutableList<PlaylistStreamEntry>> fun getStreamsWithoutDuplicates(playlistId: Long): Flowable<MutableList<PlaylistStreamEntry>>
@RewriteQueriesToDropUnusedColumns
@Transaction @Transaction
@Query( @Query(
""" """