fix a crash when url or vcodes are missing for a stream

always initialize them, also initialize hardsub_locale since it might be optional too
This commit is contained in:
Jannik 2022-07-16 14:13:08 +02:00
parent 4c55bb771f
commit 97966f5ad3
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
2 changed files with 17 additions and 17 deletions

View File

@ -380,9 +380,9 @@ data class Streams(
@Serializable
data class Stream(
@SerialName("hardsub_locale") val hardsubLocale: String,
@SerialName("url") val url: String,
@SerialName("vcodec") val vcodec: String,
@SerialName("hardsub_locale") val hardsubLocale: String = "", // default/nullable value since might be optional
@SerialName("url") val url: String = "", // default/nullable value since optional
@SerialName("vcodec") val vcodec: String = "", // default/nullable value since optional
)
val NonePlayback = Playback(