(2021-09-03, 20:08)Atreyu Wrote: Ah, missed that. Sorry.
Ideally, having a specific code that can be assigned to a button which will trigger minutes +10 per press for instance would be awesome. In case that would be too cumbersome (which I can easily imagine) any method that would stop a playing or paused stream after a set amount of time would be a great addition to Kodi.
In addition to the sleep functionality I added, I've given the sleep timer enabling / disabling some thought. The easiest thing to do is call the addon via either the keyboard.xml (a key stroke) or the favourites.xml file and call the Autostart addon. This would be very easy to do. The question then is what do we do with it ?
I see three potential options:
1. Keep the current sleep timer setting option so the time doesn't change but have another sleep timer enable / disable option which gets toggled when the addon is called. Then it would be a single click or keypress to enable / disable the sleep timer.
2. Similar to #1 except have 2 sleep timers which you can set at different times. Then when you call the addon via a keypress or click it rotates between disable and the 2 sleep timers.
3. When the addon is called it sequences from 0 - 60 minutes in say 10 minute intervals. So first click is 10 mins, second 20 etc. until you get to 60 and then it goes back to 0.
All would be fairly easy to code. One thing to keep in mind is that with each click I would popup a dialog box to tell you what you changed the setting to so with #3 it could be a few clicks to go from say 10 minutes to 60 or back to 0 to disable. I kind of like #2 myself.
A fourth, simplest of all option, would be to map a favourite or keystroke to the addon settings and have it popup the settings window for the addon.
Here's the favourites approach.
<favourites>
<favourite name="Autostop Settings">Addon.OpenSettings(service.autostop)</favourite>
</favourites>
Thoughts ?
Jeff