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

Feature: Skip Steps to be configurable #427

Open
Tony-Coding opened this issue Oct 15, 2021 · 9 comments · May be fixed by #1092
Open

Feature: Skip Steps to be configurable #427

Tony-Coding opened this issue Oct 15, 2021 · 9 comments · May be fixed by #1092

Comments

@Tony-Coding
Copy link

I posted the below question in another forum and thought it would be a good feature request. To alter the behaviour of the Skip Steps. I use +3min as it gets pretty close to the end of the commercial and I can back track 10 seconds each press.

  1. Skip Steps to use the configured values in Kodi. This is difficult as Buschel advises below.
  2. Make Skip Steps configurable in the Kodi App.
  3. Don't have the app handle the seek rather. The App sends the UI navigation command ("navigate right") and Kodi server handles the seek (as if the i button was pressed) I gleaned this from Buschel's comment and don't know if it is possible .

Thanks
Tony

https://forum.kodi.tv/showthread.php?tid=364635&pid=3064299#pid3064299
I notice that when I press the navigate right or navigate left buttons on the Remote. It skips 30 seconds.
When I press the show information button 'i' which displays the time slider on the tv it will skip as per my setup skip steps in Kodi. (Ie. +3 min, +5 min, +10 min, -30sec, -1min, -10min)
Is there a way to have the navigate right and navigate left buttons skip as per the kodi skip steps, without having to press the 'i' ?

Buschel replied with:
I just took a look into the App's source code. When the (i) button was pressed and the time bar is shown the App does not handle the seek anymore. The App only sends the UI navigation command ("navigate right") and Kodi server handles the seek. When the time bar is not shown the App sends "seek" commands which always uses +/-30 seconds or +/- 10 mins. To implement what you are having in mind, the App would need to read the Kodi server settings for seek steps and use them for the seek commands. I am not yet sure, if reading the seek step is supported by Kodi's API. In addition, this will be requiring quite some changes in the seek handling on the App's side. So: Not sure, if feasible, and not a simple change to do.

@Tony-Coding Tony-Coding changed the title Skip Steps to be configurable Feature: Skip Steps to be configurable Oct 15, 2021
@wutschel
Copy link
Collaborator

Thanks, good to see your input here. I will have a look at this at a later point in time. First, a lot of other changes are prepared and shall go into the Remote App.

@Tony-Coding
Copy link
Author

Thanks for considering. I really love the new layout btw with the volume on the front screen.

@wutschel
Copy link
Collaborator

wutschel commented Oct 16, 2021

Thanks :)

Btw, I just took a deeper look. It is more complicated. The Remote App always sends the up/down/left/right button events for GUI navigation (e.g. Input.Left). When Kodi does not show the time slider it ignores these commands -- pressing the buttons on the keyboard of the PC this works. I am not sure why. To work around this the Remote App is sending another seek command (Player.Seek) in this case. This kind of workaround seek-command does not know the Kodi seek steps. I will need some more time to look into this. Maybe it is possible to send keyboard commands...

@wutschel
Copy link
Collaborator

Next update: When sending key events (Input.ButtonEvent), it works as you are expecting on my Kodi 19.1. I have no clue though what happens with older Kodi versions ...

@wutschel
Copy link
Collaborator

Hmm, bad news.Input.ButtonEvent is new and only supported since Kodi 19. So, I cannot change the implementation the same way for all Kodi versions. All versions before Kodi 19 need to have this "special treatment" which calls Player.Seek methods instead of simply triggering the keyboard behaviour. I can change this for Kodi 19 and later, but then the behaviour changes for different Kodi versions. This will also raise questions by users...

@wutschel
Copy link
Collaborator

It is possible to read the videoplayer's seek steps via the API (method: Settings.GetSettingValue, params: videoplayer.seeksteps). But I cannot tell if this possible for version before Kodi 19, and I am not sure it is easy to make use of this (would need timers to only change the steps if the buttons are pressed in quick order). In my opinion this is overcomplicating the implementation and will make it harder to maintain.

@Tony-Coding
Copy link
Author

I run v19.1 as well. Maybe when enough time goes buy so there aren't many pre v19 in use it would be time to implement a v19 implementation update. :-)
Just a thought and I am in no way trivialising the difficulties of maintaining a pre v19 and post v19 code. The app could have a switch for prev19 and v19 operation in the settings. Until the legacy code can be removed. Although I'm sure you have already though of the implecations of this.
Thanks for looking into this and the time you have have already spent. It's always a shame when a change doesn't just dovetail into the existing code. Thanks for a great app!
Cheers
Tony

@wutschel wutschel linked a pull request Jun 30, 2024 that will close this issue
@wutschel
Copy link
Collaborator

Finally changed this now, see the PR for more details.

@Tony-Coding
Copy link
Author

Great to hear, thanks, I can't wait to try it out. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants