Skip to content

Commit

Permalink
Don't display a button on server auto
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Oct 11, 2024
1 parent d32ae72 commit c9a2f35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ data class SegmentButtonConfig(
@SerialName("SkipButtonEndCreditsText")
val skipButtonEndCreditsText: String,
@SerialName("SkipButtonVisible")
val skipButtonVisible: Boolean
val skipButtonVisible: Boolean,
@SerialName("AutoSkip")
val autoSkip: Boolean,
@SerialName("AutoSkipCredits")
val autoSkipCredits: Boolean
)
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ class SegmentSkipFragment : Fragment() {
}

fun handleProgress(currentPosition: Long) {
// Check if server is full auto
if (buttonConfig?.autoSkip == true && buttonConfig?.autoSkipCredits == true) {
button.isVisible = false
return
}

val currentSegment = getCurrentSegment(currentPosition) ?: lastSegment ?: return
lastSegment = currentSegment

Expand Down

0 comments on commit c9a2f35

Please sign in to comment.