@classmethod
def stream_weight(cls, stream):
    match_3d = re.match('(\\w+)_3d', stream)
    match_hfr = re.match('(\\d+p)(\\d+)', stream)
    if match_3d:
        (weight, group) = Plugin.stream_weight(match_3d.group(1))
        weight -= 1
        group = 'youtube_3d'
    elif match_hfr:
        (weight, group) = Plugin.stream_weight(match_hfr.group(1))
        weight += 1
        group = 'high_frame_rate'
    else:
        (weight, group) = Plugin.stream_weight(stream)
    return (weight, group)
@classmethod
def stream_weight(cls, stream):
    match_3d = re.match('(\\w+)_3d', stream)
    match_hfr = re.match('(\\d+p)(\\d+)', stream)
    if match_3d:
        (weight, group) = Plugin.stream_weight(match_3d.group(1))
        weight -= 1
        group = 'youtube_3d'
    elif match_hfr:
        (weight, group) = Plugin.stream_weight(match_hfr.group(1))
        weight += 1
        group = 'high_frame_rate'
    else:
        (weight, group) = Plugin.stream_weight(stream)
    return (weight, group)