Merge pull request #988 from croneter/optimize-migration
Don't migrate PKC settings if we're dealing with a clean new PKC installation
This commit is contained in:
commit
2e90a30dba
1 changed files with 7 additions and 3 deletions
|
@ -13,10 +13,14 @@ LOG = getLogger('PLEX.migration')
|
||||||
def check_migration():
|
def check_migration():
|
||||||
LOG.info('Checking whether we need to migrate something')
|
LOG.info('Checking whether we need to migrate something')
|
||||||
last_migration = utils.settings('last_migrated_PKC_version')
|
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!
|
# Ensure later migration if user downgraded PKC!
|
||||||
utils.settings('last_migrated_PKC_version', value=v.ADDON_VERSION)
|
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
|
return
|
||||||
|
|
||||||
if not utils.compare_version(last_migration, '1.8.2'):
|
if not utils.compare_version(last_migration, '1.8.2'):
|
||||||
|
|
Loading…
Reference in a new issue