def settings(self): kodiutil.ADDON.openSettings() kodiutil.setScope() cinemavision.init(kodiutil.DEBUG()) for item in self.sequenceControl: if item.dataSource: self.updateItemSettings(item) if not self.checkForContentDB(): cvutil.loadContent()
def checkAPILevel(): old = getSetting('API_LEVEL', 0) if not old: firstRun() elif old == 1: setSetting('from.beta', ADDON.getAddonInfo('version')) elif old < 3: LOG('API LEVEL < 3: Clearing trailers and updating DB') last = os.path.join(PROFILE_PATH, 'itunes.last') watched = os.path.join(PROFILE_PATH, 'watched.db') if os.path.exists(last): os.remove(last) if os.path.exists(watched): os.remove(watched) import cvutil cvutil.loadContent() xbmc.sleep(1000) if old < 4: LOG('API LEVEL < 4: Migrating default sequences') contentPath = getSetting('content.path') if contentPath: from lib import cinemavision sequencesPath = cinemavision.util.pathJoin(contentPath, 'Sequences') for stereoType in ['2D', '3D']: default = getSetting('sequence.{0}'.format(stereoType)) if default: path = cinemavision.util.pathJoin( sequencesPath, '{0}.cvseq'.format(default)) if cinemavision.util.vfs.exists(path): LOG('API Migration: Activating sequence for {0}: {1}'. format(stereoType, default)) seqData = cinemavision.sequence.SequenceData.load(path) seqData.active = True seqData.set('type', stereoType) seqData.save() if getSetting('from.beta'): DEBUG_LOG('UPDATED FROM BETA: {0}'.format(getSetting('from.beta'))) setSetting('API_LEVEL', API_LEVEL)
def checkAPILevel(): old = getSetting('API_LEVEL', 0) if not old: firstRun() elif old == 1: setSetting('from.beta', ADDON.getAddonInfo('version')) elif old < 3: LOG('API LEVEL < 3: Clearing trailers and updating DB') last = os.path.join(PROFILE_PATH, 'itunes.last') watched = os.path.join(PROFILE_PATH, 'watched.db') if os.path.exists(last): os.remove(last) if os.path.exists(watched): os.remove(watched) import cvutil cvutil.loadContent() xbmc.sleep(1000) if getSetting('from.beta'): DEBUG_LOG('UPDATED FROM BETA: {0}'.format(getSetting('from.beta'))) setSetting('API_LEVEL', API_LEVEL)
def loadContent(self): if self.checkForContentDB() and not kodiutil.getSetting( 'database.autoUpdate', False): return cvutil.loadContent()
def loadContent(self): if self.checkForContentDB() and not kodiutil.getSetting('database.autoUpdate', False): return cvutil.loadContent()