Official-Kodi-Remote-iOS icon indicating copy to clipboard operation
Official-Kodi-Remote-iOS copied to clipboard

Feature: Skip Steps to be configurable

Open Tony-Coding opened this issue 3 years ago • 9 comments

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 avatar Oct 15 '21 00:10 Tony-Coding

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.

wutschel avatar Oct 15 '21 08:10 wutschel

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

Tony-Coding avatar Oct 15 '21 23:10 Tony-Coding

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 avatar Oct 16 '21 16:10 wutschel

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 avatar Oct 16 '21 16:10 wutschel

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 avatar Oct 16 '21 18:10 wutschel

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.

wutschel avatar Oct 16 '21 19:10 wutschel

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

Tony-Coding avatar Oct 18 '21 03:10 Tony-Coding