mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +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(
|
data class LocalPlaylist(
|
||||||
@PrimaryKey(autoGenerate = true)
|
@PrimaryKey(autoGenerate = true)
|
||||||
val id: Int = 0,
|
val id: Int = 0,
|
||||||
var name: String,
|
var name: String = "",
|
||||||
var thumbnailUrl: String
|
var thumbnailUrl: String = ""
|
||||||
)
|
)
|
||||||
|
@ -4,10 +4,10 @@ import androidx.room.Embedded
|
|||||||
import androidx.room.Relation
|
import androidx.room.Relation
|
||||||
|
|
||||||
data class LocalPlaylistWithVideos(
|
data class LocalPlaylistWithVideos(
|
||||||
@Embedded val playlist: LocalPlaylist,
|
@Embedded val playlist: LocalPlaylist = LocalPlaylist(),
|
||||||
@Relation(
|
@Relation(
|
||||||
parentColumn = "id",
|
parentColumn = "id",
|
||||||
entityColumn = "playlistId"
|
entityColumn = "playlistId"
|
||||||
)
|
)
|
||||||
val videos: List<LocalPlaylistItem>
|
val videos: List<LocalPlaylistItem> = listOf()
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user