From 6fccb2ad1621c2adf268b0af890f5dfa942dc448 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 15 Dec 2022 19:24:26 +0100 Subject: [PATCH] Parse the preview images from the `streams` response --- .../com/github/libretube/api/obj/PreviewFrames.kt | 14 ++++++++++++++ .../java/com/github/libretube/api/obj/Streams.kt | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/com/github/libretube/api/obj/PreviewFrames.kt diff --git a/app/src/main/java/com/github/libretube/api/obj/PreviewFrames.kt b/app/src/main/java/com/github/libretube/api/obj/PreviewFrames.kt new file mode 100644 index 000000000..db7a051d4 --- /dev/null +++ b/app/src/main/java/com/github/libretube/api/obj/PreviewFrames.kt @@ -0,0 +1,14 @@ +package com.github.libretube.api.obj + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties + +@JsonIgnoreProperties(ignoreUnknown = true) +data class PreviewFrames( + val urls: List? = null, + val frameWidth: Int? = null, + val frameHeight: Int? = null, + val totalCount: Int? = null, + val durationPerFrame: Int? = null, + val framesPerPageX: Int? = null, + val framesPerPageY: Int? = null +) diff --git a/app/src/main/java/com/github/libretube/api/obj/Streams.kt b/app/src/main/java/com/github/libretube/api/obj/Streams.kt index 17c5965c5..f4c561b22 100644 --- a/app/src/main/java/com/github/libretube/api/obj/Streams.kt +++ b/app/src/main/java/com/github/libretube/api/obj/Streams.kt @@ -26,5 +26,6 @@ data class Streams( val livestream: Boolean? = null, val proxyUrl: String? = null, val chapters: List? = null, - val uploaderSubscriberCount: Long? = null + val uploaderSubscriberCount: Long? = null, + val previewFrames: List? = null )