jarnedemeulemeester / findroid

Third-party native Jellyfin Android app
GNU General Public License v3.0
2.17k stars 138 forks source link

Support on skipping credits in intro skipper #620

Open smarttommyau opened 6 months ago

smarttommyau commented 6 months ago

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.

Natanel-Shitrit commented 6 months ago

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 commented 4 months ago

@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 commented 4 months ago

@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 commented 4 months ago

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 commented 4 months ago

I guess you are referring to your discussion here https://github.com/jumoog/intro-skipper/issues/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: https://github.com/jarnedemeulemeester/findroid/blob/c30b76d4f1e94810b60561c92ab8081fdddc5d44/player/video/src/main/java/dev/jdtech/jellyfin/viewmodels/PlayerActivityViewModel.kt#L247-L262

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 commented 4 months ago

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