Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d4b4ebc
feat: Add TextClock to player custom layout for video playback time d…
JelleSThijs Jun 22, 2026
9827d15
feat: Add vector clock icon for UI enhancements
JelleSThijs Jun 22, 2026
eb5b591
feat: Add tv layout clock settings title, description and key to stri…
JelleSThijs Jun 22, 2026
3a52d90
feat: Add tv layout clock settings option in player settings
JelleSThijs Jun 22, 2026
b8fc780
feat: Animate video clock position in fullscreen player
JelleSThijs Jun 22, 2026
ed0cdbc
feat: Set tv layout clock visibility based on settings
JelleSThijs Jun 22, 2026
1e84bc1
feat: Add player video clock to player_custom_layout.xml to adhere to…
JelleSThijs Jun 22, 2026
be2bc46
refactor: transfer tv_layout_clock_key
JelleSThijs Jun 22, 2026
1233949
refactor: update tv_layout_clock settings title and description for c…
JelleSThijs Jun 22, 2026
febf325
refactor: simplify playerVideoClock access and visibility handling
JelleSThijs Jun 22, 2026
c6723ae
feat: hide tv_layout_clock setting on PHONE and EMULATOR
JelleSThijs Jun 22, 2026
c9b7c06
refactor: Specify that the real time clock is shown in the video player
JelleSThijs Jun 22, 2026
693db01
feat: Add real-time clock to home layouts
JelleSThijs Jun 23, 2026
33a63ed
refactor: remove unused TextClock import from FullScreenPlayer.kt
JelleSThijs Jun 23, 2026
488bf37
fix: ensure playerVideoClock is hidden in non-TV layouts
JelleSThijs Jun 23, 2026
3db6887
feat: set visibility and scroll effect for TV home page real time clock
JelleSThijs Jun 23, 2026
0af8077
refactor: relocate tv_layout_clock setting from player settings to UI…
JelleSThijs Jun 23, 2026
42d18fd
refactor: move and update tv_layout_clock strings to reflect its use …
JelleSThijs Jun 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -286,6 +287,12 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

val titleMove = if (isShowing) 0f else -50.toPx.toFloat()
playerBinding?.playerVideoClock.let {
ObjectAnimator.ofFloat(it, "translationY", titleMove).apply {
duration = 200
start()
}
}
playerBinding?.playerVideoTitleHolder?.let {
ObjectAnimator.ofFloat(it, "translationY", titleMove).apply {
duration = 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,12 @@ 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?.playerVideoClock?.isVisible = showTvClock
}
}

unwrapBundle(savedInstanceState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_baseline_clock_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:pathData="m612,668 l56,-56 -148,-148v-184h-80v216l172,172ZM480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,480ZM480,800q133,0 226.5,-93.5T800,480q0,-133 -93.5,-226.5T480,160q-133,0 -226.5,93.5T160,480q0,133 93.5,226.5T480,800Z"
android:fillColor="#e3e3e3"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/layout/player_custom_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@
tools:visibility="visible"
android:layout_gravity="center"/>
</LinearLayout>

<TextClock
android:id="@+id/player_video_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="end"
android:visibility="gone"
android:textStyle="bold" />
</LinearLayout>

<!-- Removed as it has no use anymore-->
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/res/layout/player_custom_layout_tv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,22 @@
android:layout_marginEnd="32dp"
android:orientation="vertical">

<TextClock
android:id="@+id/player_video_clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="end"
android:maxWidth="600dp"
android:textAlignment="viewEnd"
android:textColor="@color/white"
android:textSize="16sp"
android:visibility="visible"
android:format12Hour="hh:mm a"
android:format24Hour="HH:mm"
android:fontFamily="@font/google_sans"
android:textStyle="bold" />

<LinearLayout
android:id="@+id/player_video_title_holder"
android:layout_width="wrap_content"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/donottranslate-strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<string name="opensubtitles_key">opensubtitles_key</string>
<string name="subdl_key">subdl_key</string>
<string name="animeskip_key">animeskip_key</string>
<string name="tv_layout_clock_key">tv_layout_clock_key</string>

<string name="pref_category_security_key">pref_category_security_key</string>
<string name="pref_category_gestures_key">pref_category_gestures_key</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
<string name="extra_brightness_settings">Extra brightness</string>
<string name="extra_brightness_settings_des">Enable brightness filter when 100% display brightness is exceeded</string>
<string name="extra_brightness_key">extra_brightness_enabled</string>
<string name="tv_layout_clock_settings">Player real time clock</string>
<string name="tv_layout_clock_settings_des">Show a real time clock above the video title in the video player</string>
<string name="episode_sync_settings">Update watch progress</string>
<string name="episode_sync_settings_des">Automatically sync your current episode progress</string>
<string name="restore_settings">Restore data from backup</string>
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/xml/settings_player.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@
android:title="@string/extra_brightness_settings"
app:defaultValue="false"
app:key="@string/extra_brightness_key" />
<SwitchPreference
Comment thread
JelleSThijs marked this conversation as resolved.
Outdated
android:icon="@drawable/ic_baseline_clock_24"
android:summary="@string/tv_layout_clock_settings_des"
android:title="@string/tv_layout_clock_settings"
android:defaultValue="false"
android:key="@string/tv_layout_clock_key" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_gestures"
Expand Down