Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dc1ff57
Trying Auto Skip
phisher98 Apr 5, 2026
da4edd4
Merge branch 'master' into AutoSkip-Into/Outro
phisher98 Apr 9, 2026
a7a8dc1
Trying Auto Skip
phisher98 Apr 9, 2026
3b7ce95
Minor Fix
phisher98 Apr 9, 2026
8db31a1
Minor Changes
phisher98 Apr 13, 2026
fd1db69
Minor Changes
phisher98 Apr 14, 2026
409d615
Minor Changes
phisher98 Apr 16, 2026
5bbd18a
Minor Changes
phisher98 Apr 16, 2026
8add6fb
Minor Changes
phisher98 Apr 16, 2026
9223320
Minor Changes
phisher98 Apr 16, 2026
f30fa58
Merge branch 'master' into AutoSkip-Into/Outro
fire-light42 Jul 3, 2026
ec27450
Merge branch 'master' into AutoSkip-Into/Outro
phisher98 Nov 1, 2026
9963802
Make the auto-skip countdown cancellable
phisher98 Nov 1, 2026
cf1406c
Add undo snackbar, configurable countdown, per-type auto-skip and ski…
phisher98 Nov 1, 2026
0a80c5e
Fix auto-skip countdown restarting on every buffering/seek event
phisher98 Nov 1, 2026
4e5631a
Move auto-skip settings into the Compose player settings and drop the…
phisher98 Nov 1, 2026
a157c3f
Trying
phisher98 Nov 15, 2026
7b47e9f
Merge remote-tracking branch 'origin/master' into AutoSkip-Into/Outro
phisher98 Nov 15, 2026
c8f6366
Update library Kotlin ABI dump
phisher98 Nov 16, 2026
96c93c2
Remove JDK 21 SequencedCollection methods from library ABI for JDK 17 CI
phisher98 Nov 16, 2026
812db1a
Use AppSettings instead of raw SharedPreferences for auto-skip
phisher98 Nov 18, 2026
17ecb16
Move SkipType to the shared module and store auto-skip types as an en…
phisher98 Nov 18, 2026
1a3ceb8
Minor Fix
phisher98 Nov 22, 2026
1f56b0a
Minor Fix
phisher98 Nov 24, 2026
ff8b3eb
Merge branch 'master' into AutoSkip-Into/Outro
phisher98 Nov 28, 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 @@ -671,6 +671,7 @@ class CS3IPlayer : IPlayer {

companion object {
private const val CRONET_TIMEOUT_MS = 15_000
private const val SKIP_CHAPTER_END_MARGIN_MS = 500L

/**
* Single shared engine, to minimize the overhead of maintaining many as:
Expand Down Expand Up @@ -1028,7 +1029,9 @@ class CS3IPlayer : IPlayer {
if (lastTimeStamp.skipToNextEpisode) {
handleEvent(CSPlayerEvent.NextEpisode, source)
} else {
seekTo(lastTimeStamp.timestamp.endMs + 1L)
// A small margin past the end so the last frames
// of the skipped section are not shown
seekTo(lastTimeStamp.timestamp.endMs + SKIP_CHAPTER_END_MARGIN_MS)
}
event(TimestampSkippedEvent(timestamp = lastTimeStamp, source = source))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

open fun showMirrorsDialogue() {
onPlayerInteraction()
throw NotImplementedError()
}

open fun showTracksDialogue() {
onPlayerInteraction()
throw NotImplementedError()
}

Expand All @@ -250,10 +252,12 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
loadResponse: LoadResponse?,
dismissCallback: (() -> Unit)
) {
onPlayerInteraction()
throw NotImplementedError()
}

open fun showEpisodesOverlay() {
onPlayerInteraction()
throw NotImplementedError()
}

Expand Down Expand Up @@ -508,6 +512,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

private fun showSubtitleOffsetDialog() {
onPlayerInteraction()
val ctx = context ?: return
// Pause player because the subtitles cannot be continuously updated to follow playback.
player.handleEvent(
Expand Down Expand Up @@ -644,6 +649,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

private fun showSpeedDialog() {
onPlayerInteraction()
val act = activity ?: return
val isPlaying = player.getIsPlaying()
player.handleEvent(CSPlayerEvent.Pause, PlayerEventSource.UI)
Expand Down Expand Up @@ -714,6 +720,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
// this is the standard, expected suppression for this obtainStyledAttributes pattern.
@SuppressLint("ResourceType")
private fun showCompressorDialog() {
onPlayerInteraction()
val act = activity ?: return
val compressor = (player as? CS3IPlayer)?.compressor ?: return

Expand Down Expand Up @@ -1093,11 +1100,20 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(

override fun isUIShowing(): Boolean = isShowing

/**
* Called whenever the user interacts with the player while it is active
* (tap, swipe or key press). Lets subclasses abort automatic actions
* such as the auto-skip countdown.
*/
override fun onPlayerInteraction() {}

override fun onSingleTap() {
onPlayerInteraction()
onClickChange()
}

override fun onTouchDown() {
onPlayerInteraction()
if (isShowingEpisodeOverlay) toggleEpisodesOverlay(show = false)
}

Expand Down Expand Up @@ -1294,6 +1310,10 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

private fun handleKeyEvent(event: KeyEvent, hasNavigated: Boolean): Boolean {
if (event.action == KeyEvent.ACTION_DOWN) {
onPlayerInteraction()
}

if (hasNavigated) {
autoHide()
return false
Expand Down Expand Up @@ -1492,64 +1512,77 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

playerRotateBtt.setOnClickListener {
onPlayerInteraction()
autoHide()
toggleRotate()
}

// init clicks
playerResizeBtt.setOnClickListener {
onPlayerInteraction()
autoHide()
nextResize()
}

playerSpeedBtt.setOnClickListener {
onPlayerInteraction()
autoHide()
showSpeedDialog()
}

playerCompressorBtt.setOnClickListener {
onPlayerInteraction()
autoHide()
showCompressorDialog()
}

playerSkipOp.setOnClickListener {
onPlayerInteraction()
autoHide()
skipOp()
}

playerSkipEpisode.setOnClickListener {
onPlayerInteraction()
autoHide()
player.handleEvent(CSPlayerEvent.NextEpisode)
}

playerGoForward.setOnClickListener {
onPlayerInteraction()
autoHide()
player.handleEvent(CSPlayerEvent.NextEpisode)
}

playerRestart.setOnClickListener {
onPlayerInteraction()
autoHide()
player.handleEvent(CSPlayerEvent.Restart)
}

playerLock.setOnClickListener {
onPlayerInteraction()
autoHide()
toggleLock()
}

playerSubtitleOffsetBtt.setOnClickListener {
onPlayerInteraction()
showSubtitleOffsetDialog()
}

playerGoBack.setOnClickListener {
onPlayerInteraction()
activity?.popCurrentPage("FullScreenPlayer")
}

playerSourcesBtt.setOnClickListener {
onPlayerInteraction()
showMirrorsDialogue()
}

playerTracksBtt.setOnClickListener {
onPlayerInteraction()
showTracksDialogue()
}

Expand All @@ -1563,6 +1596,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(

@SuppressLint("ClickableViewAccessibility")
exoProgress.setOnTouchListener { _, event ->
onPlayerInteraction()
// this makes the bar not disappear when sliding
when (event.action) {
MotionEvent.ACTION_DOWN,
Expand All @@ -1577,6 +1611,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
return@setOnTouchListener false
}
playerEpisodesButton.setOnClickListener {
onPlayerInteraction()
toggleEpisodesOverlay(show = true)
}
}
Expand Down Expand Up @@ -1621,6 +1656,7 @@ open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding>(
}

private fun toggleEpisodesOverlay(show: Boolean) {
if (show) onPlayerInteraction()
if (show && !isShowingEpisodeOverlay) {
previousPlayStatus = player.getIsPlaying()
player.handleEvent(CSPlayerEvent.Pause)
Expand Down
Loading