'Reads in the old naming settings from your config and generates a new config template from them.'

def _migrate_v1(self):

    sickbeard.NAMING_PATTERN = self._name_to_pattern()
    logger.log((u"Based    on    your    old    settings    I'm    setting    your    new    naming    pattern    to:    " + sickbeard.NAMING_PATTERN))
    sickbeard.NAMING_CUSTOM_ABD = check_setting_bool(self.config_obj, u'General', u'naming_dates')
    if sickbeard.NAMING_CUSTOM_ABD:
        sickbeard.NAMING_ABD_PATTERN = self._name_to_pattern(True)
        logger.log((u'Adding    a    custom    air-by-date    naming    pattern    to    your    config:    ' + sickbeard.NAMING_ABD_PATTERN))
    else:
        sickbeard.NAMING_ABD_PATTERN = naming.name_abd_presets[0]
    sickbeard.NAMING_MULTI_EP = int(check_setting_int(self.config_obj, u'General', u'naming_multi_ep_type', 1))
    main_db_con = db.DBConnection()
    season_folder_shows = main_db_con.select(u'SELECT    indexer_id    FROM    tv_shows    WHERE    flatten_folders    =    0    LIMIT    1')
    if season_folder_shows:
        old_season_format = check_setting_str(self.config_obj, u'General', u'season_folders_format', u'Season    %02d')
        if old_season_format:
            try:
                new_season_format = (old_season_format % 9)
                new_season_format = six.text_type(new_season_format).replace(u'09', u'%0S')
                new_season_format = new_season_format.replace(u'9', u'%S')
                logger.log(((((u'Changed    season    folder    format    from    ' + old_season_format) + u'    to    ') + new_season_format) + u',    prepending    it    to    your    naming    config'))
                sickbeard.NAMING_PATTERN = ((new_season_format + os.sep) + sickbeard.NAMING_PATTERN)
            except (TypeError, ValueError):
                logger.log(((u"Can't    change    " + old_season_format) + u'    to    new    season    format'), logger.ERROR)
    else:
        logger.log(u"No    shows    were    using    season    folders    before    so    I'm    disabling    flattening    on    all    shows")
        main_db_con.action(u'UPDATE    tv_shows    SET    flatten_folders    =    0')
    sickbeard.NAMING_FORCE_FOLDERS = naming.check_force_season_folders()
