Skip to content

Commit

Permalink
add default values, make some fields nullable & rename ExtendedAudioT…
Browse files Browse the repository at this point in the history
…rack -> ExtendedTrackInfo
  • Loading branch information
topi314 committed Oct 14, 2023
1 parent 71f7c82 commit 077621a
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import kotlinx.serialization.Serializable

@Serializable
data class ExtendedPlaylistInfo(
val type: Type,
val url: String,
val artworkUrl: String,
val author: String
val type: Type = Type.PLAYLIST,
val url: String? = null,
val artworkUrl: String? = null,
val author: String? = null,
val totalTracks: Int? = null,
) {
/**
* The type of the originating track list.
Expand Down Expand Up @@ -42,11 +43,11 @@ data class ExtendedPlaylistInfo(
}

@Serializable
data class ExtendedAudioTrack(
val albumName: String?,
val albumUrl: String?,
val artistUrl: String?,
val artistArtworkUrl: String?,
val previewUrl: String?,
val isPreview: Boolean
data class ExtendedTrackInfo(
val albumName: String? = null,
val albumUrl: String? = null,
val artistUrl: String? = null,
val artistArtworkUrl: String? = null,
val previewUrl: String? = null,
val isPreview: Boolean = false
)

0 comments on commit 077621a

Please sign in to comment.