mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
commit
bd7abb5082
@ -1,3 +1,6 @@
|
|||||||
|
2.1.4
|
||||||
|
- fixes bug in sleep control
|
||||||
|
|
||||||
2.1.3
|
2.1.3
|
||||||
- fix so python dont steal xbmc's webserver port (again)
|
- fix so python dont steal xbmc's webserver port (again)
|
||||||
- add option to wake up periodically
|
- add option to wake up periodically
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<setting id="SABNZBD_PWD" value="" />
|
<setting id="SABNZBD_PWD" value="" />
|
||||||
<setting id="SABNZBD_USER" value="" />
|
<setting id="SABNZBD_USER" value="" />
|
||||||
<setting id="SABNZBD_KEEP_AWAKE" value="false" />
|
<setting id="SABNZBD_KEEP_AWAKE" value="false" />
|
||||||
<setting id="SABNZBD_PERIODIC_WAKE" value="true" />
|
<setting id="SABNZBD_PERIODIC_WAKE" value="false" />
|
||||||
<setting id="SABNZBD_WAKE_AT" value="1" />
|
<setting id="SABNZBD_WAKE_AT" value="1" />
|
||||||
</settings>
|
</settings>
|
||||||
|
@ -58,8 +58,8 @@ sabNzbdQueue = 'http://' + sabNzbdAddress + '/sabnzbd/api?mode=queue&output
|
|||||||
socket.setdefaulttimeout(timeout)
|
socket.setdefaulttimeout(timeout)
|
||||||
|
|
||||||
# perform some initial checks and log essential settings
|
# perform some initial checks and log essential settings
|
||||||
shouldKeepAwake = __settings__.getSetting('SABNZBD_KEEP_AWAKE')
|
shouldKeepAwake = (__settings__.getSetting('SABNZBD_KEEP_AWAKE').lower() == 'true')
|
||||||
wakePeriodically = __settings__.getSetting('SABNZBD_PERIODIC_WAKE')
|
wakePeriodically = (__settings__.getSetting('SABNZBD_PERIODIC_WAKE').lower() == 'true')
|
||||||
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
|
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
|
||||||
if shouldKeepAwake:
|
if shouldKeepAwake:
|
||||||
xbmc.log('SABnzbd-Suite: will prevent idle sleep/shutdown while downloading')
|
xbmc.log('SABnzbd-Suite: will prevent idle sleep/shutdown while downloading')
|
||||||
@ -70,8 +70,8 @@ if wakePeriodically:
|
|||||||
while (not xbmc.abortRequested):
|
while (not xbmc.abortRequested):
|
||||||
|
|
||||||
# reread setting in case it has changed
|
# reread setting in case it has changed
|
||||||
shouldKeepAwake = __settings__.getSetting('SABNZBD_KEEP_AWAKE')
|
shouldKeepAwake = (__settings__.getSetting('SABNZBD_KEEP_AWAKE').lower() == 'true')
|
||||||
wakePeriodically = __settings__.getSetting('SABNZBD_PERIODIC_WAKE')
|
wakePeriodically = (__settings__.getSetting('SABNZBD_PERIODIC_WAKE').lower() == 'true')
|
||||||
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
|
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
|
||||||
|
|
||||||
# check if SABnzbd is downloading
|
# check if SABnzbd is downloading
|
||||||
@ -108,4 +108,5 @@ while (not xbmc.abortRequested):
|
|||||||
open("/sys/class/rtc/rtc0/wakealarm", "w").write("0")
|
open("/sys/class/rtc/rtc0/wakealarm", "w").write("0")
|
||||||
open("/sys/class/rtc/rtc0/wakealarm", "w").write(str(secondsSinceEpoch))
|
open("/sys/class/rtc/rtc0/wakealarm", "w").write(str(secondsSinceEpoch))
|
||||||
|
|
||||||
xbmc.sleep(checkInterval * 1000)
|
xbmc.sleep(checkInterval * 1000)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user