Don't migrate PKC settings if we're dealing with a fresh PKC installation

This commit is contained in:
croneter 2019-09-10 17:56:56 +02:00
parent ddaa26c385
commit 801695fdd4

View file

@ -13,10 +13,14 @@ LOG = getLogger('PLEX.migration')
def check_migration():
LOG.info('Checking whether we need to migrate something')
last_migration = utils.settings('last_migrated_PKC_version')
if last_migration == v.ADDON_VERSION:
LOG.info('Already migrated to PKC version %s' % v.ADDON_VERSION)
# Ensure later migration if user downgraded PKC!
utils.settings('last_migrated_PKC_version', value=v.ADDON_VERSION)
if last_migration == '':
LOG.info('New, clean PKC installation - no migration necessary')
return
elif last_migration == v.ADDON_VERSION:
LOG.info('Already migrated to PKC version %s' % v.ADDON_VERSION)
return
if not utils.compare_version(last_migration, '1.8.2'):