'Upgrades config file from previous verisions and bumps up config version'

def _upgrade(self):

    if (self.CONFIG_VERSION == '0'):
        if (self.MOVIE_NOTIFY_ENABLE == 1):
            self.TV_NOTIFY_ENABLE = 1
        if (self.VIDEO_LOGGING_ENABLE == 0):
            self.MOVIE_LOGGING_ENABLE = 0
            self.TV_LOGGING_ENABLE = 0
        self.CONFIG_VERSION = '1'
    if (self.CONFIG_VERSION == '1'):
        if self.HOME_STATS_CARDS:
            home_stats_cards = ''.join(self.HOME_STATS_CARDS).split(',    ')
            if ('watch_statistics' in home_stats_cards):
                home_stats_cards.remove('watch_statistics')
                self.HOME_STATS_CARDS = home_stats_cards
        if self.HOME_LIBRARY_CARDS:
            home_library_cards = ''.join(self.HOME_LIBRARY_CARDS).split(',    ')
            if ('library_statistics' in home_library_cards):
                home_library_cards.remove('library_statistics')
                self.HOME_LIBRARY_CARDS = home_library_cards
        self.CONFIG_VERSION = '2'
    if (self.CONFIG_VERSION == '2'):
        self.NOTIFY_ON_START_SUBJECT_TEXT = self.NOTIFY_ON_START_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_START_BODY_TEXT = self.NOTIFY_ON_START_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_STOP_SUBJECT_TEXT = self.NOTIFY_ON_STOP_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_STOP_BODY_TEXT = self.NOTIFY_ON_STOP_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_PAUSE_SUBJECT_TEXT = self.NOTIFY_ON_PAUSE_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_PAUSE_BODY_TEXT = self.NOTIFY_ON_PAUSE_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_RESUME_SUBJECT_TEXT = self.NOTIFY_ON_RESUME_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_RESUME_BODY_TEXT = self.NOTIFY_ON_RESUME_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_BUFFER_SUBJECT_TEXT = self.NOTIFY_ON_BUFFER_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_BUFFER_BODY_TEXT = self.NOTIFY_ON_BUFFER_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_WATCHED_SUBJECT_TEXT = self.NOTIFY_ON_WATCHED_SUBJECT_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_ON_WATCHED_BODY_TEXT = self.NOTIFY_ON_WATCHED_BODY_TEXT.replace('{progress}', '{progress_duration}')
        self.NOTIFY_SCRIPTS_ARGS_TEXT = self.NOTIFY_SCRIPTS_ARGS_TEXT.replace('{progress}', '{progress_duration}')
        self.CONFIG_VERSION = '3'
    if (self.CONFIG_VERSION == '3'):
        if (self.HTTP_ROOT == '/'):
            self.HTTP_ROOT = ''
        self.CONFIG_VERSION = '4'
    if (self.CONFIG_VERSION == '4'):
        if ((not len(self.HOME_STATS_CARDS)) and ('watch_stats' in self.HOME_SECTIONS)):
            home_sections = self.HOME_SECTIONS
            home_sections.remove('watch_stats')
            self.HOME_SECTIONS = home_sections
        if ((not len(self.HOME_LIBRARY_CARDS)) and ('library_stats' in self.HOME_SECTIONS)):
            home_sections = self.HOME_SECTIONS
            home_sections.remove('library_stats')
            self.HOME_SECTIONS = home_sections
        self.CONFIG_VERSION = '5'
    if (self.CONFIG_VERSION == '5'):
        self.MONITOR_PMS_UPDATES = 0
        self.CONFIG_VERSION = '6'
    if (self.CONFIG_VERSION == '6'):
        if (self.GIT_USER.lower() == 'drzoidberg33'):
            self.GIT_USER = 'JonnyWong16'
        self.CONFIG_VERSION = '7'
