예제 #1
0
def convert_release_list_for_recordings(obj):
    """
    :type obj: :class:`[mbdata.models.Track]`
    """
    release_list = models.release_list()
    map(lambda t: release_list.add_release(convert_release_from_track(t)), obj)
    return release_list
예제 #2
0
파일: convert.py 프로젝트: mineo/sir
def convert_release_list_for_recordings(obj):
    """
    :type obj: :class:`[mbdata.models.Track]`
    """
    release_list = models.release_list()
    [release_list.add_release(convert_release_from_track(t)) for t in obj]
    return release_list
예제 #3
0
파일: convert.py 프로젝트: roni-5/sir
def convert_release_list_for_release_groups(obj):
    """
    :type obj: :class:`[mbdata.models.Release]`
    """
    release_list = models.release_list(count=len(obj))
    for r in obj:
        release = models.release()
        release.set_id(r.gid)
        release.set_title(r.name)
        if r.status is not None:
            release.set_status(convert_release_status(r.status))

        release_list.add_release(release)
    return release_list
예제 #4
0
파일: convert.py 프로젝트: mineo/sir
def convert_release_list_for_release_groups(obj):
    """
    :type obj: :class:`[mbdata.models.Release]`
    """
    release_list = models.release_list(count=len(obj))
    for r in obj:
        release = models.release()
        release.set_id(r.gid)
        release.set_title(r.name)
        if r.status is not None:
            release.set_status(r.status.name)

        release_list.add_release(release)
    return release_list