示例#1
0
 def __init__(self):
     common.debug('%s v%s has been started' %
                  (common.AddonName(), common.AddonVersion()))
     try:
         if len(sys.argv) >= 2:
             params = dict(arg.split("=") for arg in sys.argv[1].split("&"))
             self._winid = params.get("window", "12006")
         else:
             self._winid = "12006"
             self.window = xbmcgui.Window(int(self._winid))
     except Exception as ex:
         common.error('Unexpected error while parsing arguments: %s' %
                      str(ex))
     if self.addonrunning:
         common.debug(
             'Script already running, no additional instance is needed')
     else:
         # addon setup
         self._configurations()
         self.__settings = MediaSlideshowSettings(
             updateSettingsMethod=self.setup)
         #
         self._nice()
         self._providers()
         if bool(self.PROVIDERS):
             self.execute()
         else:
             common.error("No data provider detected!")
     common.debug('%s v%s has been terminated' %
                  (common.AddonName(), common.AddonVersion()))
示例#2
0
 def _close(self):
     self.close()
     xbmc.sleep(300)
     xbmcgui.Window(self.__winid).clearProperty('GlobalSearch.SearchString')
     common.debug('%s v%s has been terminated' %
                  (common.AddonName(), common.AddonVersion()))
示例#3
0
 def __init__(self, *args, **kwargs):
     common.debug('%s v%s has been started' %
                  (common.AddonName(), common.AddonVersion()))
     self.searchstring = kwargs["searchstring"].replace('(', '[(]').replace(
         ')', '[)]').replace('+', '[+]')
     common.debug('Getting search string: %s' % self.searchstring)
示例#4
0
 def __del__(self):
     common.debug('%s v%s has been terminated' %
                  (common.AddonName(), common.AddonVersion()))
     del self
示例#5
0
 def __init__(self):
     common.debug('%s v%s has been started' %
                  (common.AddonName(), common.AddonVersion()))