'Converts CP\'s quality profile to a format that can be converted to FlexGet QualityRequirement'

@staticmethod
def quality_requirement_builder(quality_profile):

    sources = {u'BR-Disk': u'remux', u'brrip': u'bluray', u'dvdr': u'dvdrip', u'dvdrip': u'dvdrip', u'scr': u'dvdscr', u'r5': u'r5', u'tc': u'tc', u'ts': u'ts', u'cam': u'cam'}
    resolutions = {u'1080p': u'1080p', u'720p': u'720p'}
    res_string = u'|'.join(set([resolutions[quality] for quality in quality_profile[u'qualities'] if (quality in resolutions)]))
    source_string = u'|'.join(set([sources[quality] for quality in quality_profile[u'qualities'] if (quality in sources)]))
    quality_requirement = ((res_string + u'    ') + source_string).rstrip()
    log.debug(u'quality    requirement    is    %s', quality_requirement)
    return quality_requirement
