From 5da73f4d7b33ef52db4ff6e47ea0b4b2775b1e7d Mon Sep 17 00:00:00 2001 From: LagradOst Date: Fri, 11 Feb 2022 15:04:03 +0100 Subject: [PATCH] minor fix + filler --- .../cloudstream3/ui/player/CS3IPlayer.kt | 7 +++++++ .../cloudstream3/ui/player/FullScreenPlayer.kt | 3 ++- .../cloudstream3/ui/player/GeneratorPlayer.kt | 5 ++++- app/src/main/res/layout/player_custom_layout.xml | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index 532bacf0..879c5300 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -563,6 +563,13 @@ class CS3IPlayer() : IPlayer { super.onPlayerError(error) } + //override fun onCues(cues: MutableList) { + // cues.firstOrNull()?.text?.let { + // println("CUE: $it") + // } + // super.onCues(cues) + //} + override fun onRenderedFirstFrame() { updatedTime() if (!hasUsedFirstRender) { // this insures that we only call this once per player load diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt index ae22d282..fad8434f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt @@ -42,7 +42,6 @@ import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage import com.lagradost.cloudstream3.utils.UIHelper.showSystemUI import com.lagradost.cloudstream3.utils.UIHelper.toPx import com.lagradost.cloudstream3.utils.Vector2 -import kotlinx.android.synthetic.main.fragment_player.* import kotlinx.android.synthetic.main.player_custom_layout.* import kotlin.math.* @@ -387,6 +386,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { //TITLE player_video_title_rez?.startAnimation(fadeAnimation) + player_episode_filler?.startAnimation(fadeAnimation) player_video_title?.startAnimation(fadeAnimation) player_top_holder?.startAnimation(fadeAnimation) // BOTTOM @@ -408,6 +408,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { player_top_holder?.isGone = isGone player_video_title?.isGone = isGone player_video_title_rez?.isGone = isGone + player_episode_filler?.isGone = isGone player_center_menu?.isGone = isGone player_lock?.isGone = !isShowing //player_media_route_button?.isClickable = !isGone diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt index 97e17b89..385ebb1f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt @@ -282,7 +282,6 @@ class GeneratorPlayer : FullScreenPlayer() { } else { currentSubtitles.getOrNull(subtitleIndex - 1)?.let { setSubtitles(it) - true } ?: false } } @@ -458,8 +457,10 @@ class GeneratorPlayer : FullScreenPlayer() { var season: Int? = null var tvType: TvType? = null + var isFiller : Boolean? = null when (val meta = currentMeta) { is ResultEpisode -> { + isFiller = meta.isFiller headerName = meta.headerName episode = meta.episode season = meta.season @@ -473,6 +474,8 @@ class GeneratorPlayer : FullScreenPlayer() { } } + player_episode_filler_holder?.isVisible = isFiller ?: false + player_video_title?.text = if (headerName != null) { headerName + if (tvType.isEpisodeBased() && episode != null) diff --git a/app/src/main/res/layout/player_custom_layout.xml b/app/src/main/res/layout/player_custom_layout.xml index 35ba7421..baf87e72 100644 --- a/app/src/main/res/layout/player_custom_layout.xml +++ b/app/src/main/res/layout/player_custom_layout.xml @@ -100,6 +100,19 @@ android:textSize="40sp" /> + + + + + +