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

feat: skip credits #633

Merged
merged 46 commits into from
Jul 27, 2024
Merged

Conversation

cd16b
Copy link
Contributor

@cd16b cd16b commented Jan 22, 2024

Support for jumoog's Intro Skipper:

  • FindroidSegment
  • Skip Intros
  • Skip Credits

Keep using the old API for intros, and still support ConfusedPolarBear's Intro Skipper.

fix #620

@cd16b cd16b changed the title Skip credits feat: Skip credits Jan 23, 2024
@Gauvino
Copy link

Gauvino commented Feb 3, 2024

Does this could support https://github.com/endrl/jellyfin-plugin-media-analyzer ?

@cd16b
Copy link
Contributor Author

cd16b commented Feb 3, 2024

Does this could support https://github.com/endrl/jellyfin-plugin-media-analyzer?

This PR only allows skipping credits from Jumoog's Intro Skipper v0.1.8.0, a new release of ConfusedPolarBear's Intro Skipper.
The plugin "endrl/jellyfin-plugin-media-analyzer" needs the segments API, but it is not currently supported by Jellyfin version 10.8.xx. Therefore, we will have to wait at least for Jellyfin 10.9.0.

For more information, please refer to:

@jumoog
Copy link

jumoog commented Mar 1, 2024

I only forked the plugin for myself because ConfusedPolarBear quit. I also left everything as it is so that you only have to change the repo url and everything continues to work.

@AbandonedCart

This comment was marked as resolved.

@cd16b
Copy link
Contributor Author

cd16b commented Mar 3, 2024

Seems silly to submit an entire PR for this, but you want the line above to check the hideSkipPromptAt value - 1. Thought it might be better to suggest throwing it in with yours.

Ok, I've added the - 1, but sometimes the button is still visible for some time due to this:

@AbandonedCart

This comment was marked as resolved.

@AbandonedCart
Copy link

That's a good alternative.

@jarnedemeulemeester jarnedemeulemeester self-requested a review July 17, 2024 19:46
@jarnedemeulemeester
Copy link
Owner

I started looking at this, but have yet to review all of the changes.
I've changed it to load the segments at the beginning of each episode instead of all at once.

Other than that I have a question about the FindroidSegment. Why does it have a property skip? It seems like it is always set to true?

@cd16b
Copy link
Contributor Author

cd16b commented Jul 18, 2024

The skip property can be removed. I thought of using it in case some segments should not be skipped, but it can also be done using the segment type

@jarnedemeulemeester
Copy link
Owner

Made some more changes:

  • Restyled the buttons to the original outlined style with semi transparent background
  • Changed the Continue watching button to a X icon button
  • Also display the X button for intros
  • Keep the buttons visible when the player controls are visible (I see no reason to hide them)

@jarnedemeulemeester
Copy link
Owner

More changes:

  • Introduce enum FindroidSegmentType to specify the type instead of using a string
  • Use a map to retrieve the segments from the API and simplify the conversion to FindroidSegments
  • Save each segment in a row and it's properties in columns instead of using a single json

@jarnedemeulemeester jarnedemeulemeester changed the title feat: Skip credits feat: skip credits Jul 20, 2024
@jarnedemeulemeester
Copy link
Owner

Made some final changes.
If everything looks good to you I think we can merge this 🙂

@cd16b
Copy link
Contributor Author

cd16b commented Jul 20, 2024

Made some more changes:

  • Keep the buttons visible when the player controls are visible (I see no reason to hide them)

For these, I copied the implementation of the main streaming apps which have different behaviour for intro and credits:

  • Intro button is visible for n seconds, after that it is visible only if the player controls are visible
  • Credits button is always visible unless the player controls are visible, so you don't have more buttons for the same function Skip credits and Next, but using this logic means overwriting IntroSkipper logic (maybe we can use the same logic as Intro or add a preference switch)

Everything else looks fine 🙂👍

@jarnedemeulemeester
Copy link
Owner

Let's follow your Intro logic. The button will be visible for n seconds, after that it's only visible when the player controls are shown. Let's do this for both the Intro and Credits.

I will be implementing that change now.

Btw I made an other pretty big change. I changed the Skip credits button to actually only skip the credits and not move on to the next episode. This is because sometimes there are extra scenes after the credits which a viewer would want to watch. I got this idea from Crunchyroll (I don't have access to other streaming services), and it makes sense in my opinion. Skip intro skips the intro and Skip credits skips the credits.
It also makes the code a little less complex 🙂

jarnedemeulemeester and others added 3 commits July 22, 2024 21:49
Plus revert previous commit. It's intentional that the player controls immediately override the skip buttons visibility
@jarnedemeulemeester jarnedemeulemeester merged commit 9840ecd into jarnedemeulemeester:main Jul 27, 2024
2 checks passed
@cd16b cd16b deleted the Skip-credit branch September 9, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support on skipping credits in intro skipper
5 participants