Skip to content

Commit

Permalink
Fix serialization problems
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Jan 9, 2023
1 parent 0d0fc9e commit ada5a2d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion game/multiple-choice-game/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "dev.schlaubi.mikbot"
version = "2.8.0"
version = "2.8.1"

dependencies {
plugin(projects.game.gameApi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.schlaubi.mikmusic.innerttube
import kotlinx.serialization.Serializable

@Serializable
data class InnerTubeBox<T>(val contents: List<T> = emptyList()) : List<T> by contents
data class InnerTubeBox<T>(val contents: List<T> = emptyList())


@Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private const val timeSeparator = ':'
suspend fun requestYouTubeAutoComplete(query: String, locale: Locale): List<String> {
val response = InnerTubeClient.requestMusicAutoComplete(query, locale)

return response.firstOrNull()?.searchSuggestionsSectionRenderer?.mapNotNull {
return response.contents.firstOrNull()?.searchSuggestionsSectionRenderer?.contents?.mapNotNull {
it.searchSuggestionRenderer?.suggestion?.joinRuns()
} ?: emptyList()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ data class PlaylistPanelVideoRenderer(
}

@Serializable
data class Text(val text: String) : CharSequence by text {
data class Text(val text: String) {
override fun toString(): String = text
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data class MacroMarkersListItemRenderer(
)

@Serializable
data class TextBlock(val simpleText: String): CharSequence by simpleText {
data class TextBlock(val simpleText: String) {
override fun toString(): String = simpleText
}

Expand Down

0 comments on commit ada5a2d

Please sign in to comment.