Skip to content

Conversation

@Gorgorot38
Copy link
Contributor

Hello,

For my personal use I've implemented segment skip ability on jellycon.
This is my first time developping in python (let alone kodi extensions) so I probably did not take the right approach though it runs fine on my shield.

Feel free to make feedbacks.

Copy link
Member

@mcarlton00 mcarlton00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall very well done. The logging isn't required and this will definitely be merged before the next big release, but it'll be a big help should weirdness ever occur.

Sorry for the delay in reviewing, I had to get segments set up on my server first and was having some trouble with it.

Comment on lines 1159 to 1194

msgctxt "#30666"
msgid "Segment Skipper"
msgstr "Passer les segments"

msgctxt "#30667"
msgid "Action to take"
msgstr "Action"

msgctxt "#30668"
msgid "Start Offset (seconds)"
msgstr "Décalage début de segment (secondes)"

msgctxt "#30669"
msgid "End Offset (seconds)"
msgstr "Décalage fin de segment (secondes)"

msgctxt "#30670"
msgid "Intro Skipper"
msgstr "Introductions"

msgctxt "#30671"
msgid "Credit Skipper"
msgstr "Crédits"

msgctxt "#30672"
msgid "Skip"
msgstr "Passer"

msgctxt "#30673"
msgid "Ask"
msgstr "Passer"

msgctxt "#30674"
msgid "Do Nothing"
msgstr "Ne rien faire"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally speaking, we only update the translations for the main language (english) through git and handle the rest through https://translate.jellyfin.org/projects/jellycon/jellycon/, but that's not a big deal and we can manage that on the backend this time. Just a heads up for future PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I did not know that!
I reverted back the changes I made in this file to handle it the proper way.

log = LazyLogger(__name__)


class IntroSkipperService(threading.Thread):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a few log statements in these functions for debugging purposes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now added logs on several places. Let me know if you feel like it needs more.

Add logs
Add support for recap + preview + commercial
@Gorgorot38
Copy link
Contributor Author

Gorgorot38 commented Mar 17, 2025

I have refactored the code to make it more generic and to make it able to handle previews, recaps and commercials as well to keep it in line with other apps (though I cannot test it because I do not have medias with such segments).
I've used it for intros and credits extensively for the past month or so. No issues to report so far.

Let me know if you have other feedbacks.

Edit: I now do have a show with recaps and I can confirm it works well.

@mcarlton00 mcarlton00 merged commit fb96a34 into jellyfin:master Apr 15, 2025
3 checks passed
@mcarlton00 mcarlton00 added enhancement New feature or request minor Will trigger a minor release labels Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Will trigger a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants