From d4b4ebc9283bf5e5204f32c955cf8c22193acb96 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 14:08:41 +0200 Subject: [PATCH 01/18] feat: Add TextClock to player custom layout for video playback time display --- .../main/res/layout/player_custom_layout_tv.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/layout/player_custom_layout_tv.xml b/app/src/main/res/layout/player_custom_layout_tv.xml index 077929d87b3..50a716df06f 100644 --- a/app/src/main/res/layout/player_custom_layout_tv.xml +++ b/app/src/main/res/layout/player_custom_layout_tv.xml @@ -352,6 +352,22 @@ android:layout_marginEnd="32dp" android:orientation="vertical"> + + Date: Mon, 22 Jun 2026 14:13:36 +0200 Subject: [PATCH 02/18] feat: Add vector clock icon for UI enhancements --- app/src/main/res/drawable/ic_baseline_clock_24.xml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/src/main/res/drawable/ic_baseline_clock_24.xml diff --git a/app/src/main/res/drawable/ic_baseline_clock_24.xml b/app/src/main/res/drawable/ic_baseline_clock_24.xml new file mode 100644 index 00000000000..3436c6208ae --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_clock_24.xml @@ -0,0 +1,9 @@ + + + From eb5b5911a3c23c2c08b59bfd759451d6ac47b45d Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 14:37:08 +0200 Subject: [PATCH 03/18] feat: Add tv layout clock settings title, description and key to strings.xml --- app/src/main/res/values/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 31cf951cf5f..e15d34362f2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,6 +169,11 @@ Extra brightness Enable brightness filter when 100% display brightness is exceeded extra_brightness_enabled + + TV Layout Clock + Show clock in TV layout + tv_layout_clock_enabled + Update watch progress Automatically sync your current episode progress Restore data from backup From 3a52d905e7715cbe76f6a9bd768d7ffe4efaa3c2 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 14:37:38 +0200 Subject: [PATCH 04/18] feat: Add tv layout clock settings option in player settings --- app/src/main/res/xml/settings_player.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/res/xml/settings_player.xml b/app/src/main/res/xml/settings_player.xml index 6e136747448..71d10825e8a 100644 --- a/app/src/main/res/xml/settings_player.xml +++ b/app/src/main/res/xml/settings_player.xml @@ -128,6 +128,12 @@ android:title="@string/extra_brightness_settings" app:defaultValue="false" app:key="@string/extra_brightness_key" /> + Date: Mon, 22 Jun 2026 14:43:38 +0200 Subject: [PATCH 05/18] feat: Animate video clock position in fullscreen player --- .../lagradost/cloudstream3/ui/player/FullScreenPlayer.kt | 7 +++++++ 1 file changed, 7 insertions(+) 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 4ba933e1347..ff0727d8734 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 @@ -24,6 +24,7 @@ import android.view.animation.AccelerateDecelerateInterpolator import android.view.animation.AlphaAnimation import android.view.animation.DecelerateInterpolator import android.widget.LinearLayout +import android.widget.TextClock import androidx.annotation.OptIn import androidx.appcompat.app.AlertDialog import androidx.core.graphics.blue @@ -286,6 +287,12 @@ open class FullScreenPlayer : AbstractPlayerFragment( } val titleMove = if (isShowing) 0f else -50.toPx.toFloat() + playerBinding?.root?.findViewById(R.id.player_video_clock)?.let { + ObjectAnimator.ofFloat(it, "translationY", titleMove).apply { + duration = 200 + start() + } + } playerBinding?.playerVideoTitleHolder?.let { ObjectAnimator.ofFloat(it, "translationY", titleMove).apply { duration = 200 From ed0cdbc4d2a5c2da86dae47fe797b77a17231fa8 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 15:01:33 +0200 Subject: [PATCH 06/18] feat: Set tv layout clock visibility based on settings --- .../lagradost/cloudstream3/ui/player/GeneratorPlayer.kt | 7 +++++++ 1 file changed, 7 insertions(+) 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 17bef3ec07a..582e284d67e 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 @@ -2203,6 +2203,13 @@ class GeneratorPlayer : FullScreenPlayer() { fromTagToEnglishLanguageName(it)?.lowercase() ?: return@mapNotNull null } ?: listOf() } + + // Set up TV clock visibility + if (isLayout(TV)) { + val showTvClock = settingsManager.getBoolean(ctx.getString(R.string.tv_layout_clock_key), false) + playerBinding?.root?.findViewById(R.id.player_video_clock)?.visibility = + if (showTvClock) View.VISIBLE else View.GONE + } } unwrapBundle(savedInstanceState) From 1e84bc1f5463219b2d91ed87d75e0600e92cc93f Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:28:51 +0200 Subject: [PATCH 07/18] feat: Add player video clock to player_custom_layout.xml to adhere to the fully shared ui logic --- app/src/main/res/layout/player_custom_layout.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/res/layout/player_custom_layout.xml b/app/src/main/res/layout/player_custom_layout.xml index 04a2a1f1ff6..7b73d95bd8b 100644 --- a/app/src/main/res/layout/player_custom_layout.xml +++ b/app/src/main/res/layout/player_custom_layout.xml @@ -264,6 +264,15 @@ tools:visibility="visible" android:layout_gravity="center"/> + + From be2bc4687f101ec0316e12fd12e0cf65ee82a7bc Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:53:40 +0200 Subject: [PATCH 08/18] refactor: transfer tv_layout_clock_key - Transfer tv_layout_clock_key from strings.xml to donottranslate-strings.xml. - Rename the string value to adhere to the already existing keys. --- app/src/main/res/values/donottranslate-strings.xml | 1 + app/src/main/res/values/strings.xml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/res/values/donottranslate-strings.xml b/app/src/main/res/values/donottranslate-strings.xml index 6a4c8271341..bb222918c7c 100644 --- a/app/src/main/res/values/donottranslate-strings.xml +++ b/app/src/main/res/values/donottranslate-strings.xml @@ -101,6 +101,7 @@ opensubtitles_key subdl_key animeskip_key + tv_layout_clock_key pref_category_security_key pref_category_gestures_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e15d34362f2..e4e3cc3b6b1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,11 +169,8 @@ Extra brightness Enable brightness filter when 100% display brightness is exceeded extra_brightness_enabled - TV Layout Clock Show clock in TV layout - tv_layout_clock_enabled - Update watch progress Automatically sync your current episode progress Restore data from backup From 12339491517ff221b852f4a3c605963fde17dc5d Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:55:02 +0200 Subject: [PATCH 09/18] refactor: update tv_layout_clock settings title and description for clarity --- app/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e4e3cc3b6b1..c7b7445278c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,8 +169,8 @@ Extra brightness Enable brightness filter when 100% display brightness is exceeded extra_brightness_enabled - TV Layout Clock - Show clock in TV layout + Show real time clock + Show a real time clock above the video title Update watch progress Automatically sync your current episode progress Restore data from backup From febf3250e95502b21593d29616c5d729f9f87ab5 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:58:53 +0200 Subject: [PATCH 10/18] refactor: simplify playerVideoClock access and visibility handling - Use playerBinding?.playerVideoClock instead of using getViewById. - Use isVisible instead of an if statement for the visibility logic --- .../com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt | 2 +- .../com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 ff0727d8734..a22920d3caa 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 @@ -287,7 +287,7 @@ open class FullScreenPlayer : AbstractPlayerFragment( } val titleMove = if (isShowing) 0f else -50.toPx.toFloat() - playerBinding?.root?.findViewById(R.id.player_video_clock)?.let { + playerBinding?.playerVideoClock.let { ObjectAnimator.ofFloat(it, "translationY", titleMove).apply { duration = 200 start() 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 582e284d67e..7fa88f303df 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 @@ -2207,8 +2207,7 @@ class GeneratorPlayer : FullScreenPlayer() { // Set up TV clock visibility if (isLayout(TV)) { val showTvClock = settingsManager.getBoolean(ctx.getString(R.string.tv_layout_clock_key), false) - playerBinding?.root?.findViewById(R.id.player_video_clock)?.visibility = - if (showTvClock) View.VISIBLE else View.GONE + playerBinding?.playerVideoClock?.isVisible = showTvClock } } From c6723aee8cdc6616607a1229e32d85ae0583dcd3 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:59:14 +0200 Subject: [PATCH 11/18] feat: hide tv_layout_clock setting on PHONE and EMULATOR --- .../com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt index 0a0fb33c8aa..47c6b924215 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt @@ -55,6 +55,7 @@ class SettingsPlayer : BasePreferenceFragmentCompat() { getPref(R.string.preview_seekbar_key)?.hideOn(TV) getPref(R.string.pref_category_android_tv_key)?.hideOn(PHONE) + getPref(R.string.tv_layout_clock_key)?.hideOn(PHONE or EMULATOR) getPref(R.string.video_buffer_length_key)?.setOnPreferenceClickListener { val prefNames = resources.getStringArray(R.array.video_buffer_length_names) From c9b7c067ae9ffa5896c22299aa81c6c8c2865c0f Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Mon, 22 Jun 2026 16:59:58 +0200 Subject: [PATCH 12/18] refactor: Specify that the real time clock is shown in the video player --- app/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c7b7445278c..71bafcf7bdf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,8 +169,8 @@ Extra brightness Enable brightness filter when 100% display brightness is exceeded extra_brightness_enabled - Show real time clock - Show a real time clock above the video title + Player real time clock + Show a real time clock above the video title in the video player Update watch progress Automatically sync your current episode progress Restore data from backup From 693db0170fa0bcc11fff84f1fe99a9bfc96433b5 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Tue, 23 Jun 2026 12:04:21 +0200 Subject: [PATCH 13/18] feat: Add real-time clock to home layouts - Add invisible text clock to the normal home layout for Unified ui logic - Add the functional text clock to the TV layout --- app/src/main/res/layout/fragment_home.xml | 6 ++++++ app/src/main/res/layout/fragment_home_tv.xml | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 99a764deee8..8d78c01b3e7 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -227,6 +227,12 @@ tools:listitem="@layout/homepage_parent" tools:visibility="gone" /> + + + + + Date: Tue, 23 Jun 2026 12:20:31 +0200 Subject: [PATCH 14/18] refactor: remove unused TextClock import from FullScreenPlayer.kt --- .../com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt | 1 - 1 file changed, 1 deletion(-) 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 a22920d3caa..59e925e8fab 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 @@ -24,7 +24,6 @@ import android.view.animation.AccelerateDecelerateInterpolator import android.view.animation.AlphaAnimation import android.view.animation.DecelerateInterpolator import android.widget.LinearLayout -import android.widget.TextClock import androidx.annotation.OptIn import androidx.appcompat.app.AlertDialog import androidx.core.graphics.blue From 488bf37abb047f7d263fc5fe04a3f7594ea90eb2 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Tue, 23 Jun 2026 12:20:54 +0200 Subject: [PATCH 15/18] fix: ensure playerVideoClock is hidden in non-TV layouts --- .../com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt | 2 ++ 1 file changed, 2 insertions(+) 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 7fa88f303df..87b85a205e4 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 @@ -2208,6 +2208,8 @@ class GeneratorPlayer : FullScreenPlayer() { if (isLayout(TV)) { val showTvClock = settingsManager.getBoolean(ctx.getString(R.string.tv_layout_clock_key), false) playerBinding?.playerVideoClock?.isVisible = showTvClock + } else { + playerBinding?.playerVideoClock?.isVisible = false } } From 3db68875b3fe864fc30c55ebc08440f4ea45214e Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Tue, 23 Jun 2026 12:24:19 +0200 Subject: [PATCH 16/18] feat: set visibility and scroll effect for TV home page real time clock - Set visibility based on layout and the appropriate setting - Apply the same scroll effect to the clock as for the home api holder --- .../cloudstream3/ui/home/HomeFragment.kt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt index b68ef59625c..d8c5ec56737 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt @@ -673,6 +673,23 @@ class HomeFragment : BaseFragment( homeViewModel.queryTextSubmit("") } + // Load value for toggling Tv layout real time clock. Hide by default at startup + // set visibility first, to apply a scroll effect later + context?.let { + if (isLayout(TV)) { + val settingsManager = PreferenceManager.getDefaultSharedPreferences(it) + val toggleClock = + settingsManager.getBoolean( + getString(R.string.tv_layout_clock_key), + false + ) + binding.homeClock.isVisible = toggleClock + } else { + binding.homeClock.isVisible = false + } + } + + homeMasterRecycler.addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { if (isLayout(PHONE)) { @@ -712,6 +729,17 @@ class HomeFragment : BaseFragment( view.getLocationInWindow(rect) scrollParent.isVisible = true scrollParent.translationY = rect[1].toFloat() - 60.toPx + + // Move the TV layout real time clock out of the way too + // We check if we have the correct layout and if the clock is enabled + if(isLayout(TV) && binding.homeClock.isVisible) { + val scrollParent = binding.homeClock + + val rect = IntArray(2) + view.getLocationInWindow(rect) + scrollParent.isVisible = true + scrollParent.translationY = rect[1].toFloat() - 60.toPx + } } } super.onScrolled(recyclerView, dx, dy) From 0af8077a173bd2a63552237c43fe2a8315dcebc0 Mon Sep 17 00:00:00 2001 From: Jelle Thijs Date: Tue, 23 Jun 2026 12:38:42 +0200 Subject: [PATCH 17/18] refactor: relocate tv_layout_clock setting from player settings to UI settings This was done since the clock now also appears on the homescreen --- .../lagradost/cloudstream3/ui/settings/SettingsPlayer.kt | 1 - .../com/lagradost/cloudstream3/ui/settings/SettingsUI.kt | 2 ++ app/src/main/res/xml/settings_player.xml | 6 ------ app/src/main/res/xml/settings_ui.xml | 6 ++++++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt index 47c6b924215..0a0fb33c8aa 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt @@ -55,7 +55,6 @@ class SettingsPlayer : BasePreferenceFragmentCompat() { getPref(R.string.preview_seekbar_key)?.hideOn(TV) getPref(R.string.pref_category_android_tv_key)?.hideOn(PHONE) - getPref(R.string.tv_layout_clock_key)?.hideOn(PHONE or EMULATOR) getPref(R.string.video_buffer_length_key)?.setOnPreferenceClickListener { val prefNames = resources.getStringArray(R.array.video_buffer_length_names) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt index f4c522bf981..5f86a3a5a10 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt @@ -228,6 +228,8 @@ class SettingsUI : BasePreferenceFragmentCompat() { return@setOnPreferenceClickListener true } + getPref(R.string.tv_layout_clock_key)?.hideOn(PHONE or EMULATOR) + getPref(R.string.confirm_exit_key)?.setOnPreferenceClickListener { val prefNames = resources.getStringArray(R.array.confirm_exit) val prefValues = resources.getIntArray(R.array.confirm_exit_values) diff --git a/app/src/main/res/xml/settings_player.xml b/app/src/main/res/xml/settings_player.xml index 71d10825e8a..6e136747448 100644 --- a/app/src/main/res/xml/settings_player.xml +++ b/app/src/main/res/xml/settings_player.xml @@ -128,12 +128,6 @@ android:title="@string/extra_brightness_settings" app:defaultValue="false" app:key="@string/extra_brightness_key" /> - + Date: Tue, 23 Jun 2026 12:40:01 +0200 Subject: [PATCH 18/18] refactor: move and update tv_layout_clock strings to reflect its use across the player and home screens - move the strings so that they are now located next to the appropriate settings - update the title and description to now include that the clock is now also on the homescreen --- app/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 71bafcf7bdf..ee304744d33 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,8 +169,6 @@ Extra brightness Enable brightness filter when 100% display brightness is exceeded extra_brightness_enabled - Player real time clock - Show a real time clock above the video title in the video player Update watch progress Automatically sync your current episode progress Restore data from backup @@ -376,6 +374,8 @@ Looks Features General + Show real time clock + Show a real time clock at the top of the screen. Applies to the homepage and player Random Button Show random button on Homepage and Library Extension languages