Esempio n. 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
Esempio n. 2
0
File: convert.py Progetto: 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
Esempio n. 3
0
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
Esempio n. 4
0
File: convert.py Progetto: 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