コード例 #1
0
 def _init_vars(self):
     self.SETTINGS = loadSettings()
     self.PROFILESLIST = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
     # this only includes mappings we are 100% sure are accurate every time
     self.MAPTYPE = {
         'video': 'auto_videos',
         'episode': 'auto_tvshows',
         'musicvideo': 'auto_musicvideo',
         'song': 'auto_music'
     }
     self.LW = Logger(preamble='[Audio Profiles Service]',
                      logdebug=self.SETTINGS['debug'])
     self.PROFILES = Profiles(self.SETTINGS, self.LW, auto=True)
     self.KODIPLAYER = xbmc.Player()
     self.LW.log(['the settings are:', self.SETTINGS])
     self.LW.log(['initialized variables'])
コード例 #2
0
 def __init__(self):
     """Runs the audio profiler switcher manually."""
     settings = loadSettings()
     lw = Logger(preamble='[Audio Profiles]', logdebug=settings['debug'])
     lw.log(['script version %s started' % settings['ADDONVERSION']],
            xbmc.LOGINFO)
     lw.log(['debug logging set to %s' % settings['debug']], xbmc.LOGINFO)
     lw.log(['SYS.ARGV: %s' % str(sys.argv)])
     lw.log(['loaded settings', settings])
     profiles = Profiles(settings, lw)
     try:
         mode = sys.argv[1]
     except IndexError:
         mode = False
     lw.log(['MODE: %s' % str(mode)])
     profiles.changeProfile(mode)
     lw.log(['script version %s stopped' % settings['ADDONVERSION']],
            xbmc.LOGINFO)
コード例 #3
0
def _upgrade():
    settings = loadSettings()
    if settings['version_upgrade'] != settings['ADDONVERSION']:
        settings['ADDON'].setSetting('version_upgrade',
                                     settings['ADDONVERSION'])