Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support on skipping credits in intro skipper #620

Open
smarttommyau opened this issue Jan 11, 2024 · 6 comments · May be fixed by #633
Open

Support on skipping credits in intro skipper #620

smarttommyau opened this issue Jan 11, 2024 · 6 comments · May be fixed by #633
Labels
enhancement New feature or request

Comments

@smarttommyau
Copy link

Is your feature request related to a problem? Please describe.
Credits not able to be skipped

Describe the solution you'd like
Avaliable in https://github.com/jumoog/intro-skipper's build
Use"IntroSkipperSegments"(support both intro and credits) at first and use "IntroTimestamps"(this only support intro)
Format of IntroSkipperSegemets:

{
    "Introduction": {
        "EpisodeId": "1e3cf41f1ae051f68ab56980f937f745",
        "Valid": true,
        "IntroStart": 145.792,
        "IntroEnd": 228.497,
        "ShowSkipPromptAt": 140.792,
        "HideSkipPromptAt": 155.792
    },
    "Credits": {
        "EpisodeId": "1e3cf41f1ae051f68ab56980f937f745",
        "Valid": true,
        "IntroStart": 1313.264,
        "IntroEnd": 1408.2640000000001,
        "ShowSkipPromptAt": 1308.264,
        "HideSkipPromptAt": 1323.264
    }
}

Additional context
This should only introduce some small modification without breaking the original support, hope this can be implemented.

@smarttommyau smarttommyau added the enhancement New feature or request label Jan 11, 2024
@Natanel-Shitrit
Copy link
Contributor

I know it's not exactly what you are asking for but after

is merged it's possible to create a "generic" way to skip intros / credits sections, without any 3rd party plugins :)

@AbandonedCart
Copy link

@Natanel-Shitrit Assuming your video supports it, this also eliminates a lengthy scan that requires Chromaprint, but it just doesn't have that "Netflix" feel to it.

@Natanel-Shitrit
Copy link
Contributor

@Natanel-Shitrit Assuming your video supports it, this also eliminates a lengthy scan that requires Chromaprint, but it just doesn't have that "Netflix" feel to it.

Most of the shows that I have (Anime) have chapters, that might not be the case for "normal" shows.

You can integrate the chapters with the skip button if you want the "Netflix" feel - I just suggested to use the chapter info as the way of detection for the intro / credits 😄

@AbandonedCart
Copy link

AbandonedCart commented Mar 2, 2024

It almost begs the question why literally everyone opted for Chromaprint, but not a single static ffmpeg for Mac enables it.

Anyway, that isn't why I was here. I was actually here to ... Edit: well, actually, here isn't the best place for it.

@Natanel-Shitrit
Copy link
Contributor

I guess you are referring to your discussion here jumoog/intro-skipper#52
I saw you said:

They are determining when the button is displayed on their end. I don't know if there is a check somewhere else, but it's essentially keeping the button visible the entire time the intro is playing.

And you linked this check:

val introCheckRunnable = object : Runnable {
override fun run() {
if (player.currentMediaItem != null && player.currentMediaItem!!.mediaId.isNotEmpty()) {
val itemId = UUID.fromString(player.currentMediaItem!!.mediaId)
intros[itemId]?.let { intro ->
val seconds = player.currentPosition / 1000.0
if (seconds > intro.showSkipPromptAt && seconds < intro.hideSkipPromptAt) {
_uiState.update { it.copy(currentIntro = intro) }
return@let
}
_uiState.update { it.copy(currentIntro = null) }
}
}
handler.postDelayed(this, 1000L)
}
}

Doesn't showSkipPromptAt and hideSkipPromptAt is given by the plugin?
So if you fixed the segment.IntroEnd shouldn't it reflect on hideSkipPromptAt?

https://github.com/jumoog/intro-skipper/blob/f49bf50a5b87d470ea387ec1c59b848043a57246/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs#L89-L102

GitHub only renders snippets from the origin repo 😢

@AbandonedCart
Copy link

AbandonedCart commented Mar 2, 2024

Actually, no. Two different apps can use the same database, but interpret the values differently. That's what is happening.

This app is getting the value from the plugin, but not necessarily checking it the same way. At the time the plugin was written, it only supported an arbitrary dismissal time of the button. I added the option to keep it visible for the duration of the intro just recently.

The original plugin had an option to retain a section of the intro. It also accounted for the possibility that if the code defaulted to showing the button for the entire intro (it was a fallback back then), it would subtract that time. Oddly, though, this was done AFTER the end time was already determined for the button and only served to mark the playback value.

When using the option to retain the button for the entire intro, most of the original code gets ignored in favor of the raw intro times. The app checks every second, but the plugin is using 3 decimal places. The difference between when the value triggers the display in the app to stop and when the intro ends is somewhere between 1 - 2 seconds off, usually resulting in the button not disappearing right away. If there was intro left, it would likely go unnoticed.

TL;DR intro.hideSkipPromptAt - 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants