What methods can I use to check if recording is currently active, or if they are pending N minutes from now? Basically I want to do same check that enigma2 does when starting, to avoid restarting if recordings are active or pending.
How to programatically check if recording is active or almost active?
Re: How to programatically check if recording is active or almost active? #2
Re: How to programatically check if recording is active or almost active? #3
Re: How to programatically check if recording is active or almost active? #4
Geplaatst op 6 juli 2018 - 19:41
Hello @JasonM8,
Here you have example code which show how you should ask Enigma2 to restart:
def doRestartFailed(self, *args):self.session.open(MessageBox, _("Restart GUI failed. \nPlease restart STB manually."), type = MessageBox.TYPE_INFO, timeout=5 )from Screens.Standby import TryQuitMainloopself.session.openWithCallback(self.doRestartFailed, TryQuitMainloop, retvalue=3)
Veranderd door samsamsam, 6 juli 2018 - 19:42
Re: How to programatically check if recording is active or almost active? #5
Geplaatst op 6 juli 2018 - 20:02
with webinterface
echo "ongoing timers:" $(wget -O- -q http://127.0.0.1/web/timerlist |grep "e2state" | grep -c ">2<")
ongoing timers: 0
as you see I have no active recordings
Re: How to programatically check if recording is active or almost active? #6
Geplaatst op 7 juli 2018 - 08:33
Great tip!
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Re: How to programatically check if recording is active or almost active? #7
Geplaatst op 7 juli 2018 - 09:38
1 gebruiker(s) lezen dit onderwerp
0 leden, 1 bezoekers, 0 anonieme gebruikers