From d888fd86861ee3bce1fdf87549146669d816dc9f Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Mon, 11 Feb 2013 08:43:33 +0100 Subject: [PATCH 1/2] iptables: fix copying extensions (again) --- packages/network/iptables/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/network/iptables/install b/packages/network/iptables/install index 2322d6cf27..822e19dc4d 100755 --- a/packages/network/iptables/install +++ b/packages/network/iptables/install @@ -30,7 +30,7 @@ mkdir -p $INSTALL/usr/lib rm -rf $INSTALL/usr/lib/libiptc.so*T mkdir -p $INSTALL/usr/lib/xtables - cp -P $PKG_BUILD/extensions/.libs/*.so $INSTALL/usr/lib/xtables + cp -P $PKG_BUILD/extensions/.libs/*.so* $INSTALL/usr/lib/xtables mkdir -p $INSTALL/usr/sbin cp -P $PKG_BUILD/iptables/.libs/xtables-multi $INSTALL/usr/sbin From 691852e66d9555f4b84e492c4930776f12ff99e5 Mon Sep 17 00:00:00 2001 From: lsellens Date: Sun, 10 Feb 2013 20:09:58 -0600 Subject: [PATCH 2/2] SABnzdb-Suite fix keep awake option. --- .../SABnzbd-Suite/source/default.py | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py index ba134decd2..b24f34feb4 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py @@ -59,7 +59,7 @@ if sabNzbdLaunch: sabNzbdApiKey = sabConfiguration['misc']['api_key'] sabNzbdUser = sabConfiguration['misc']['username'] sabNzbdPass = sabConfiguration['misc']['password'] - sabNzbdQueue = 'http://' + sabNzbdAddress + '/sabnzbd/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdUser + sabNzbdQueue = 'http://' + sabNzbdAddress + '/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdPass # start checking SABnzbd for activity and prevent sleeping if necessary socket.setdefaulttimeout(timeout) @@ -83,29 +83,30 @@ while (not xbmc.abortRequested): wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT')) # check if SABnzbd is downloading - sabIsActive = False - req = urllib2.Request(sabNzbdQueue) - try: handle = urllib2.urlopen(req) - except IOError, e: - xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR) - else: - queue = handle.read() - handle.close() - sabIsActive = (queue.find('Downloading') >= 0) + if shouldKeepAwake: + sabIsActive = False + req = urllib2.Request(sabNzbdQueue) + try: handle = urllib2.urlopen(req) + except IOError, e: + xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR) + else: + queue = handle.read() + handle.close() + sabIsActive = (queue.find('Downloading') >= 0) - # reset idle timer when we're close to idle sleep/shutdown - if (shouldKeepAwake and sabIsActive): - response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('
  • ','') - shutdownTime = int(response) * 60 - idleTime = xbmc.getGlobalIdleTime() - timeToShutdown = shutdownTime - idleTime + # reset idle timer when we're close to idle sleep/shutdown + if sabIsActive: + response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('
  • ','') + shutdownTime = int(response) * 60 + idleTime = xbmc.getGlobalIdleTime() + timeToShutdown = shutdownTime - idleTime - if (sabIsActive and timeToShutdown <= checkInterval - timeout): - xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.') - xbmc.executehttpapi("SendKey(0xF000)") + if (timeToShutdown <= checkInterval - timeout): + xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.') + xbmc.executehttpapi("SendKey(0xF000)") # calculate and set the time to wake up at (if any) - if (wakePeriodically): + if wakePeriodically: wakeHour = wakeHourIdx * 2 + 1 timeOfDay = datetime.time(hour=wakeHour) now = datetime.datetime.now()