'Handles all modes that can accept more than one quality per episode. (qualities, upgrade)
:returns: True - if at least one wanted quality has been downloaded or accepted.
False - if no wanted qualities have been accepted'

def process_qualities(self, config, entries, downloaded):

    downloaded_qualities = [r.quality for r in downloaded]
    log.debug(u'downloaded_qualities:    %s', downloaded_qualities)
    wanted_qualities = set([qualities.Requirements(name) for name in config.get(u'qualities', [])])
    still_needed = [req for req in wanted_qualities if (not any((req.allows(qual) for qual in downloaded_qualities)))]
    log.debug(u'wanted    qualities:    %s', wanted_qualities)
    def wanted(quality):
        u'Returns    True    if    we    want    this    quality    based    on    the    config    options.'
        wanted = ((not wanted_qualities) or any((req.allows(quality) for req in wanted_qualities)))
        if config.get(u'upgrade'):
            wanted = (wanted and (quality > max((downloaded_qualities or [qualities.Quality()]))))
        return wanted
    for entry in entries:
        quality = entry[u'quality']
        log.debug(u'ep:    `%s`,    quality:    `%s`', entry[u'title'], quality)
        if (not wanted(quality)):
            log.debug(u'`%s`    is    an    unwanted    quality', quality)
            continue
        if any((req.allows(quality) for req in still_needed)):
            if config.get(u'upgrade'):
                if (downloaded_qualities and (quality < max(downloaded_qualities))):
                    continue
            entry.accept(u'quality    wanted')
            downloaded_qualities.append(quality)
            downloaded.append(entry)
            still_needed = [req for req in still_needed if (not req.allows(quality))]
    return bool(downloaded_qualities)
