mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix crash when restoring a backup with playlists
This commit is contained in:
parent
785180c64f
commit
96fcb851a3
@ -7,6 +7,6 @@ import androidx.room.PrimaryKey
|
||||
data class LocalPlaylist(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
val id: Int = 0,
|
||||
var name: String,
|
||||
var thumbnailUrl: String
|
||||
var name: String = "",
|
||||
var thumbnailUrl: String = ""
|
||||
)
|
||||
|
@ -4,10 +4,10 @@ import androidx.room.Embedded
|
||||
import androidx.room.Relation
|
||||
|
||||
data class LocalPlaylistWithVideos(
|
||||
@Embedded val playlist: LocalPlaylist,
|
||||
@Embedded val playlist: LocalPlaylist = LocalPlaylist(),
|
||||
@Relation(
|
||||
parentColumn = "id",
|
||||
entityColumn = "playlistId"
|
||||
)
|
||||
val videos: List<LocalPlaylistItem>
|
||||
val videos: List<LocalPlaylistItem> = listOf()
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user