From fa938274623f7b7a959854480e8473629c8e15a6 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 27 Jun 2022 21:35:06 +0200 Subject: [PATCH] RYD integration --- .../libretube/fragments/PlayerFragment.kt | 1 + .../java/com/github/libretube/obj/Streams.kt | 4 +- app/src/main/res/layout/fragment_player.xml | 68 +++++++++++++------ 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index 57755dad2..54fe27fd7 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -565,6 +565,7 @@ class PlayerFragment : Fragment() { context?.getString(R.string.views, response.views.formatShort()) + " • " + response.uploadDate view.findViewById(R.id.textLike).text = response.likes.formatShort() + view.findViewById(R.id.textDislike).text = response.dislikes.formatShort() val channelImage = view.findViewById(R.id.player_channelImage) Picasso.get().load(response.uploaderAvatar).into(channelImage) view.findViewById(R.id.player_channelName).text = response.uploader diff --git a/app/src/main/java/com/github/libretube/obj/Streams.kt b/app/src/main/java/com/github/libretube/obj/Streams.kt index 38619f587..144a7e758 100644 --- a/app/src/main/java/com/github/libretube/obj/Streams.kt +++ b/app/src/main/java/com/github/libretube/obj/Streams.kt @@ -20,7 +20,7 @@ data class Streams( val duration: Int?, val views: Long?, val likes: Long?, - val dislikes: Int?, + val dislikes: Long?, val audioStreams: List?, val videoStreams: List?, val relatedStreams: List?, @@ -44,7 +44,7 @@ data class Streams( parcel.readValue(Int::class.java.classLoader) as? Int, parcel.readValue(Long::class.java.classLoader) as? Long, parcel.readValue(Long::class.java.classLoader) as? Long, - parcel.readValue(Int::class.java.classLoader) as? Int, + parcel.readValue(Int::class.java.classLoader) as? Long, TODO("audioStreams"), TODO("videoStreams"), TODO("relatedStreams"), diff --git a/app/src/main/res/layout/fragment_player.xml b/app/src/main/res/layout/fragment_player.xml index 212256b9e..930247359 100644 --- a/app/src/main/res/layout/fragment_player.xml +++ b/app/src/main/res/layout/fragment_player.xml @@ -62,11 +62,54 @@ android:layout_marginTop="5dp" android:orientation="horizontal"> - + android:orientation="vertical"> + + + + + + + + + + + + + + + + - - - - - - -