'Updates metadata values to the new format'

def _migrate_v5(self):

    u'    Quick    overview    of    what    the    upgrade    does:\n\n                                new    |    old    |    description    (new)\n                                ----+-----+--------------------\n                                        1    |        1        |    show    metadata\n                                        2    |        2        |    episode    metadata\n                                        3    |        4        |    show    fanart\n                                        4    |        3        |    show    poster\n                                        5    |        -        |    show    banner\n                                        6    |        5        |    episode    thumb\n                                        7    |        6        |    season    poster\n                                        8    |        -        |    season    banner\n                                        9    |        -        |    season    all    poster\n                                    10    |        -        |    season    all    banner\n\n                                Note    that    the    ini    places    start    at    1    while    the    list    index    starts    at    0.\n                                old    format:    0|0|0|0|0|0    --    6    places\n                                new    format:    0|0|0|0|0|0|0|0|0|0    --    10    places\n\n                                Drop    the    use    of    use_banner    option.\n                                Migrate    the    poster    override    to    just    using    the    banner    option    (applies    to    xbmc    only).\n                                '
    metadata_xbmc = check_setting_str(self.config_obj, u'General', u'metadata_xbmc', u'0|0|0|0|0|0')
    metadata_xbmc_12plus = check_setting_str(self.config_obj, u'General', u'metadata_xbmc_12plus', u'0|0|0|0|0|0')
    metadata_mediabrowser = check_setting_str(self.config_obj, u'General', u'metadata_mediabrowser', u'0|0|0|0|0|0')
    metadata_ps3 = check_setting_str(self.config_obj, u'General', u'metadata_ps3', u'0|0|0|0|0|0')
    metadata_wdtv = check_setting_str(self.config_obj, u'General', u'metadata_wdtv', u'0|0|0|0|0|0')
    metadata_tivo = check_setting_str(self.config_obj, u'General', u'metadata_tivo', u'0|0|0|0|0|0')
    metadata_mede8er = check_setting_str(self.config_obj, u'General', u'metadata_mede8er', u'0|0|0|0|0|0')
    use_banner = check_setting_bool(self.config_obj, u'General', u'use_banner')
    def _migrate_metadata(metadata, metadata_name, _use_banner):
        cur_metadata = metadata.split(u'|')
        if (len(cur_metadata) == 6):
            logger.log((((u'Upgrading    ' + metadata_name) + u'    metadata,    old    value:    ') + metadata))
            cur_metadata.insert(4, u'0')
            cur_metadata.append(u'0')
            cur_metadata.append(u'0')
            cur_metadata.append(u'0')
            (cur_metadata[3], cur_metadata[2]) = (cur_metadata[2], cur_metadata[3])
            if ((metadata_name == u'XBMC') and _use_banner):
                (cur_metadata[4], cur_metadata[3]) = (cur_metadata[3], u'0')
            metadata = u'|'.join(cur_metadata)
            logger.log((((u'Upgrading    ' + metadata_name) + u'    metadata,    new    value:    ') + metadata))
        elif (len(cur_metadata) == 10):
            metadata = u'|'.join(cur_metadata)
            logger.log((((u'Keeping    ' + metadata_name) + u'    metadata,    value:    ') + metadata))
        else:
            logger.log(((((u'Skipping    ' + metadata_name) + u"    metadata:    '") + metadata) + u"',    incorrect    format"), logger.ERROR)
            metadata = u'0|0|0|0|0|0|0|0|0|0'
            logger.log((((u'Setting    ' + metadata_name) + u'    metadata,    new    value:    ') + metadata))
        return metadata
    sickbeard.METADATA_XBMC = _migrate_metadata(metadata_xbmc, u'XBMC', use_banner)
    sickbeard.METADATA_XBMC_12PLUS = _migrate_metadata(metadata_xbmc_12plus, u'XBMC    12+', use_banner)
    sickbeard.METADATA_MEDIABROWSER = _migrate_metadata(metadata_mediabrowser, u'MediaBrowser', use_banner)
    sickbeard.METADATA_PS3 = _migrate_metadata(metadata_ps3, u'PS3', use_banner)
    sickbeard.METADATA_WDTV = _migrate_metadata(metadata_wdtv, u'WDTV', use_banner)
    sickbeard.METADATA_TIVO = _migrate_metadata(metadata_tivo, u'TIVO', use_banner)
    sickbeard.METADATA_MEDE8ER = _migrate_metadata(metadata_mede8er, u'Mede8er', use_banner)
