Permalink
Browse files

Fixes Issue #655

Also sets the default value for the SABnzbd-Suite auto wake
option to false.
  • Loading branch information...
1 parent f02b9cb commit 6a42dc0b778b01678fbd0e276c4e3f890734be7b @3rdcycle 3rdcycle committed May 14, 2012
View
3 packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt
@@ -1,3 +1,6 @@
+2.1.4
+- fixes bug in sleep control
+
2.1.3
- add option to wake up periodically
View
2 packages/addons/service/downloadmanager/SABnzbd-Suite/config/settings.xml
@@ -3,6 +3,6 @@
<setting id="SABNZBD_PWD" value="" />
<setting id="SABNZBD_USER" value="" />
<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" />
</settings>
View
11 packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py
@@ -58,8 +58,8 @@
socket.setdefaulttimeout(timeout)
# perform some initial checks and log essential settings
-shouldKeepAwake = __settings__.getSetting('SABNZBD_KEEP_AWAKE')
-wakePeriodically = __settings__.getSetting('SABNZBD_PERIODIC_WAKE')
+shouldKeepAwake = (__settings__.getSetting('SABNZBD_KEEP_AWAKE').lower() == 'true')
+wakePeriodically = (__settings__.getSetting('SABNZBD_PERIODIC_WAKE').lower() == 'true')
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
if shouldKeepAwake:
xbmc.log('SABnzbd-Suite: will prevent idle sleep/shutdown while downloading')
@@ -70,8 +70,8 @@
while (not xbmc.abortRequested):
# reread setting in case it has changed
- shouldKeepAwake = __settings__.getSetting('SABNZBD_KEEP_AWAKE')
- wakePeriodically = __settings__.getSetting('SABNZBD_PERIODIC_WAKE')
+ shouldKeepAwake = (__settings__.getSetting('SABNZBD_KEEP_AWAKE').lower() == 'true')
+ wakePeriodically = (__settings__.getSetting('SABNZBD_PERIODIC_WAKE').lower() == 'true')
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
# check if SABnzbd is downloading
@@ -108,4 +108,5 @@
open("/sys/class/rtc/rtc0/wakealarm", "w").write("0")
open("/sys/class/rtc/rtc0/wakealarm", "w").write(str(secondsSinceEpoch))
- xbmc.sleep(checkInterval * 1000)
+ xbmc.sleep(checkInterval * 1000)
+

0 comments on commit 6a42dc0

Please sign in to comment.