'Set the quality setting of a show. If no quality is provided, the default user setting is used.'

def run(self):

    show_obj = Show.find(sickbeard.showList, int(self.indexerid))
    if (not show_obj):
        return _responds(RESULT_FAILURE, msg=u'Show    not    found')
    new_quality = int(sickbeard.QUALITY_DEFAULT)
    i_quality_id = []
    a_quality_id = []
    if self.initial:
        for quality in self.initial:
            i_quality_id.append(QUALITY_MAP[quality])
    if self.archive:
        for quality in self.archive:
            a_quality_id.append(QUALITY_MAP[quality])
    if (i_quality_id or a_quality_id):
        new_quality = Quality.combineQualities(i_quality_id, a_quality_id)
    show_obj.quality = new_quality
    return _responds(RESULT_SUCCESS, msg=((show_obj.name + u'    quality    has    been    changed    to    ') + get_quality_string(show_obj.quality)))
