Esempio n. 1
0
 def onSettingsChanged(self):
     audo.getaddonsettings()
     if audo.audoShutdown:
         audo.shutdown()
         while audo.audoShutdown:
             xbmc.sleep(1000)
         audo.main()
Esempio n. 2
0
 def onSettingsChanged( self ):
     audo.getaddonsettings()
Esempio n. 3
0
# addon
__scriptname__   = "audo"
__author__       = "lsellens"
__url__          = "http://lsellens.openelec.tv"
audo.getaddonpaths()
timeOut          = 20
wakeTimes        = ['01:00', '03:00', '05:00', '07:00', '09:00', '11:00', '13:00', '15:00', '17:00', '19:00', '21:00',
                    '23:00']

defaultSuiteSettings = xbmc.translatePath(audo.__addonpath__ + '/settings-default.xml')
suiteSettings = xbmc.translatePath(audo.__addonhome__ + 'settings.xml')

if not xbmcvfs.exists(suiteSettings):
    xbmcvfs.copy(defaultSuiteSettings, suiteSettings)
audo.__addon__.setSetting(id='SHUTDOWN', value='false')
audo.getaddonsettings()

# detect machine arch and setup binaries on first run
if not xbmcvfs.exists(xbmc.translatePath(audo.__dependencies__ + '/arch.' + audo.pArch)):
    audo.updatedependencies()

# Launch audo
try:
    audo.main()
except Exception, e:
    xbmc.log('AUDO: Could not execute launch script:', level=xbmc.LOGERROR)
    xbmc.log(str(e), level=xbmc.LOGERROR)

# start checking SABnzbd for activity and prevent sleeping if necessary
socket.setdefaulttimeout(timeOut)
Esempio n. 4
0
# addon
__scriptname__   = "audo"
__author__       = "lsellens"
__url__          = "https://github.com/lsellens/xbmc.addons"
timeOut          = 20
wakeTimes        = ['01:00', '03:00', '05:00', '07:00', '09:00', '11:00', '13:00', '15:00', '17:00', '19:00', '21:00',
                    '23:00']

defaultSuiteSettings = xbmc.translatePath(audo.__addonpath__ + '/settings-default.xml')
suiteSettings = xbmc.translatePath(audo.__addonhome__ + 'settings.xml')

if not xbmcvfs.exists(suiteSettings):
    xbmcvfs.copy(defaultSuiteSettings, suiteSettings)
audo.__addon__.setSetting(id='SHUTDOWN', value='false')
audo.getaddonsettings()

# detect machine arch and setup binaries on first run
if not xbmcvfs.exists(xbmc.translatePath(audo.__dependencies__ + '/arch.' + audo.pArch)):
    audo.updatedependencies()

# Launch audo
try:
    audo.main()
except Exception, e:
    xbmc.log('AUDO: Could not execute launch script:', level=xbmc.LOGERROR)
    xbmc.log(str(e), level=xbmc.LOGERROR)

# start checking SABnzbd for activity and prevent sleeping if necessary
socket.setdefaulttimeout(timeOut)