v18 Setting to have Kodi stop if paused for too long?
#16
Ok.  I've not added that functionality yet.  What is in there now is that if you pause a stream it will stop it and start the screensaver (if you have selected the option) after the amount of time you selected.  For stopping a playing stream, like you are trying, how do you want to enable that feature and what is the duration window you are wanting (i.e. 0 to how many minutes ) ?  The easiest way to add is another timer setting which you could set.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#17
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.
Reply
#18
I released something like this a year ago, however it didn't receive user traction so the project was abandon...

https://forum.kodi.tv/showthread.php?tid=352082
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#19
O wow, now I am sad 😢
Had i known then, you would have certainly received some traction Wink
Reply
#20
I just posted an update which has the functionality you want via settings.  It will now stop a playback after the time you select.  I'll give some thought about enabling via keystroke.

Autostop addon

I also turned down the check time from 30 seconds to 10 seconds. 

Feedback welcome. 

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#21
(2021-09-03, 21:31)jbinkley60 Wrote: I just posted an update which has the functionality you want via settings.  It will now stop a playback after the time you select.  I'll give some thought about enabling via keystroke.

Autostop addon

I also turned down the check time from 30 seconds to 10 seconds. 

Feedback welcome. 

Jeff

I will test this out this weekend (Via Matrix on Shield), thanks!
Reply
#22
(2021-09-04, 02:33)kcook_shield Wrote:
(2021-09-03, 21:31)jbinkley60 Wrote: I just posted an update which has the functionality you want via settings.  It will now stop a playback after the time you select.  I'll give some thought about enabling via keystroke.

Autostop addon

I also turned down the check time from 30 seconds to 10 seconds. 

Feedback welcome. 

Jeff

I will test this out this weekend (Via Matrix on Shield), thanks!

Thanks. 

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#23
(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
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#24
I've only enabled paused videos to stop after 60 minutes. Seems to work fine. Thanks!
Reply
#25
(2021-09-07, 21:56)kcook_shield Wrote: I've only enabled paused videos to stop after 60 minutes. Seems to work fine. Thanks!

Thanks for the confirmation.  I am waiting for some additional feedback and then may submit this to the Kodi repository as an official addon.  Please let me know if there is any additional functionality you'd like  (i.e. maybe a pop which says the addon is stopping the video etc..).  It does write a message to the Kodi logs.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#26
(2021-09-05, 00:36)jbinkley60 Wrote: 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
Had some time to test. I really appreciate your efforts.
Both stopping a running and paused stream works. Great! 

I very much prefer option 3; it mimics the convenient old fashioned sleeptimer the best and you don't have to go into the addon settings.
Although the other methods are more lengthy setting a timer, it certainly would do the job.
Tried creating a favourite and execute from there, this does not work atm, but would be very workable as well.

Suggestions/Requests:

- Expand timer max to 120 minutes

I guess it is defined here, would be nice to have more values added by default

<options>
                            <option>0</option>
                            <option>5</option>
                                                        <option>10</option>
                                                        <option>15</option>
                                                        <option>20</option>
                                                        <option>25</option>
                                                        <option>30</option>
                                                        <option>35</option>
                                                        <option>40</option>
                                                        <option>45</option>
                                                        <option>50</option>
                                                        <option>55</option>
                                                        <option>60</option>


As it is now it is already being used here, so thank you so much!

Atreyu
Reply
#27
(2021-09-08, 10:16)Atreyu Wrote:
(2021-09-05, 00:36)jbinkley60 Wrote: 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
Had some time to test. I really appreciate your efforts.
Both stopping a running and paused stream works. Great! 

I very much prefer option 3; it mimics the convenient old fashioned sleeptimer the best and you don't have to go into the addon settings.
Although the other methods are more lengthy setting a timer, it certainly would do the job.
Tried creating a favourite and execute from there, this does not work atm, but would be very workable as well.

Suggestions/Requests:

- Expand timer max to 120 minutes

I guess it is defined here, would be nice to have more values added by default

<options>
                            <option>0</option>
                            <option>5</option>
                                                        <option>10</option>
                                                        <option>15</option>
                                                        <option>20</option>
                                                        <option>25</option>
                                                        <option>30</option>
                                                        <option>35</option>
                                                        <option>40</option>
                                                        <option>45</option>
                                                        <option>50</option>
                                                        <option>55</option>
                                                        <option>60</option>


As it is now it is already being used here, so thank you so much!

Atreyu

Thanks for the feedback.  I'll make a few tweaks and post an update.  One thought is whether you'd like a slider for the timers vs. the up/down click arrows (this would be when you are in settings).  Also for all 3 options above they would not require launching the settings.  Lastly, for the favourites, did you restart Kodi after making the change ?  If not, that needs to be done to ensure Kodi rereads the file after manually editing it.  The favourites approach worked for me.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#28
Both slider or up/down arrows are fine imho.
Thinking about it some more, what would be nice for any of the methods is being able to add minutes on the fly any time during countdown (as long as time=0 has not been reached). Preferably using an assigned button in keyboard.xml so time is added with each press.

The favorites approach indeed does work btw, i created a shortcut straight from the addon icon instead of modifying fav.xml Wink
Reply
#29
(2021-09-08, 13:11)Atreyu Wrote: Both slider or up/down arrows are fine imho.
Thinking about it some more, what would be nice for any of the methods is being able to add minutes on the fly any time during countdown (as long as time=0 has not been reached). Preferably using an assigned button in keyboard.xml so time is added with each press.

The favorites approach indeed does work btw, i created a shortcut straight from the addon icon instead of modifying fav.xml Wink

I uploaded a new version 0.0.1.3.  I have extended the sleep timer to 120 minutes.  Between 0 - 60 minutes it goes in 10 minute steps.  Above 60 I went to 30 minute steps.  Let me know if that works for you.  I also added the ability to call the addon either via keyboard.xml or favourites.xml and it will increment the sleep timer to the next setting and also display a popup window for 3 seconds to let you know the new setting.

To call this, use this example or see the readme file:

<favourites>
    <favourite name="Autostop Sleep Timer">RunScript("service.autostop")</favourite>
</favourites>



Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#30
Just got back from laying on the beach in Greece, will try your latest upload shortly, thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Setting to have Kodi stop if paused for too long?0