Exemple #1
0
    def __init__(self, addon, settings_file):
        log.debug("%s - initializing settings", addon)

        # remove dots from addon.id to resolve issue with load/save config of addon
        addon_id = addon.id.replace('.', '_')

        setattr(config.plugins.archivCZSK.archives, addon_id,
                ConfigSubsection())
        self.main = getattr(config.plugins.archivCZSK.archives, addon_id)
        addon_config.add_global_addon_settings(addon, self.main)

        self.main.enabled = ConfigYesNo(default=True)

        self.addon = addon
        self.categories = []
        # not every addon has settings
        try:
            settings_parser = parser.XBMCSettingsXMLParser(settings_file)
        except IOError:
            pass
        else:
            self.category_entries = settings_parser.parse()
            #hard code addon order for each addon
            try:
                #list.append(getConfigListEntry(_("Show movie info"), config.plugins.archivCZSK.showVideoInfo))
                labelInfo = _("Show movie info")
                obj = {
                    'option': 'false',
                    'default': 'true',
                    'label': labelInfo,
                    'visible': 'true',
                    'type': 'bool',
                    'id': 'auto_show_video_info'
                }
                self.category_entries[0]['subentries'].append(obj)

                #todo check if exist already
                labelorder = _("Addon order")
                obj = {
                    'option': 'false',
                    'default': '99999',
                    'label': labelorder,
                    'visible': 'true',
                    'type': 'text',
                    'id': 'auto_addon_order'
                }
                self.category_entries[0]['subentries'].append(obj)
                #if 'auto_addon_order' in self.category_entries[0]['subentries']:
                #    log.logInfo("############auto_addon_order already exist")
            except:
                log.logError("Add addon order (%s) failed.\n%s" %
                             (self.addon, traceback.format_exc()))
            self.initialize_settings()
Exemple #2
0
    def __init__(self, addon, settings_file):
        log.debug("%s - initializing settings", addon)


        # remove dots from addon.id to resolve issue with load/save config of addon
        addon_id = addon.id.replace('.', '_')

        setattr(config.plugins.archivCZSK.archives, addon_id, ConfigSubsection())
        self.main = getattr(config.plugins.archivCZSK.archives, addon_id)
        addon_config.add_global_addon_settings(addon, self.main)

        self.main.enabled = ConfigYesNo(default=True)

        self.addon = addon
        self.categories = []
        # not every addon has settings
        try:
            settings_parser = parser.XBMCSettingsXMLParser(settings_file)
        except IOError:
            pass
        else:
            self.category_entries = settings_parser.parse()
            #hard code addon order for each addon
            try:
                #list.append(getConfigListEntry(_("Show movie info"), config.plugins.archivCZSK.showVideoInfo))
                labelInfo = _("Show movie info")
                obj = {'option': 'false', 'default': 'true', 'label': labelInfo, 'visible': 'true', 'type': 'bool', 'id': 'auto_show_video_info'}
                self.category_entries[0]['subentries'].append(obj)

                #todo check if exist already
                labelorder = _("Addon order")
                obj = {'option': 'false', 'default': '99999', 'label': labelorder, 'visible': 'true', 'type': 'text', 'id': 'auto_addon_order'}
                self.category_entries[0]['subentries'].append(obj)
                #if 'auto_addon_order' in self.category_entries[0]['subentries']:
                #    log.logInfo("############auto_addon_order already exist")
            except:
                log.logError("Add addon order (%s) failed.\n%s" % (self.addon, traceback.format_exc()))
            self.initialize_settings()
Exemple #3
0
    def __init__(self, addon, settings_file):
        log.debug("initializing settings of addon %s", addon.name)


        # remove dots from addon.id to resolve issue with load/save config of addon
        addon_id = addon.id.replace('.', '_')

        setattr(config.plugins.archivCZSK.archives, addon_id, ConfigSubsection())
        self.main = getattr(config.plugins.archivCZSK.archives, addon_id)
        addon_config.add_global_addon_settings(addon, self.main)

        self.main.enabled = ConfigYesNo(default=True)

        self.addon = addon
        self.categories = []
        # not every addon has settings
        try:
            settings_parser = parser.XBMCSettingsXMLParser(settings_file)
        except IOError:
            pass
        else:
            self.category_entries = settings_parser.parse()
            self.initialize_settings()
Exemple #4
0
    def __init__(self, addon, settings_file):
        log.debug("%s - initializing settings", addon)


        # remove dots from addon.id to resolve issue with load/save config of addon
        addon_id = addon.id.replace('.', '_')

        setattr(config.plugins.archivCZSK.archives, addon_id, ConfigSubsection())
        self.main = getattr(config.plugins.archivCZSK.archives, addon_id)
        addon_config.add_global_addon_settings(addon, self.main)

        self.main.enabled = ConfigYesNo(default=True)

        self.addon = addon
        self.categories = []
        # not every addon has settings
        try:
            settings_parser = parser.XBMCSettingsXMLParser(settings_file)
        except IOError:
            pass
        else:
            self.category_entries = settings_parser.parse()
            self.initialize_settings()