Esempio n. 1
0
 def __init__(self, id=None):
     # In CLI mode, xbmcswift2 must be run from the root of the addon
     # directory, so we can rely on getcwd() being correct.
     addonxml = os.path.join(os.getcwd(), 'addon.xml')
     self._info = {
         'id': id or utils.get_addon_id(addonxml),
         'name': utils.get_addon_name(addonxml),
     }
     self._strings = {}
     self._settings = {}
Esempio n. 2
0
 def __init__(self, id=None):
     # In CLI mode, xbmcswift2 must be run from the root of the addon
     # directory, so we can rely on getcwd() being correct.
     addonxml = os.path.join(os.getcwd(), 'addon.xml')
     id = id or utils.get_addon_id(addonxml)
     self._info = {
         'id': id,
         'name': utils.get_addon_name(addonxml),
         'profile': 'special://profile/addon_data/%s/' % id,
         'path': 'special://home/addons/%s' % id
     }
     self._strings = {}
     self._settings = {}
    def __init__(self, id=None):
        """Creates a new Addon class.

        id: string - id of the addon (autodetected in XBMC Eden)

        Example:
            self.Addon = xbmcaddon.Addon(id='script.recentlyadded')
        """
        # In CLI mode, xbmcswift2 must be run from the root of the addon
        # directory, so we can rely on getcwd() being correct.
        addonxml = os.path.join(os.getcwd(), 'addon.xml')
        self._info = {
            'id': id or utils.get_addon_id(addonxml),
            'name': utils.get_addon_name(addonxml),
        }
        self._strings = {}
        self._settings = {}