if release.album.is_compilation:
        metadata.comp = True

    metadata.comments = release.album.note

    # encoder
    if encoder_tag is not None:
        metadata.encoder = encoder_tag

#    if track.discsubtotal:
#        metadata.discsubtotal = track.discsubtotal

    # set track metadata
    metadata.title = track.title
    metadata.artist = track.artist
    metadata.artist_sort = track.sortartist
    metadata.track = track.tracknumber

    # the following value will be wrong, if the disc has a name or is a multi
    # disc release --> fix it
    metadata.tracktotal = release.album.tracktotal_on_disc(track.discnumber)


    # it does not make sense to store this in the "common" configuration, but only in the 
    # id.txt. we use a special naming convention --> most probably we should reuse the 
    # configuration parser for this one as well, no?
    for name, value in release_tags.items():
        if name.startswith("tag:"):
            name = name.split(":")
            name = name[1]
            setattr(metadata, name, value)
Beispiel #2
0
    if release.album.is_compilation:
        metadata.comp = True

    metadata.comments = release.album.note

    # encoder
    if encoder_tag is not None:
        metadata.encoder = encoder_tag

#    if track.discsubtotal:
#        metadata.discsubtotal = track.discsubtotal

# set track metadata
    metadata.title = track.title
    metadata.artist = track.artist
    metadata.artist_sort = track.sortartist
    metadata.track = track.tracknumber

    # the following value will be wrong, if the disc has a name or is a multi
    # disc release --> fix it
    metadata.tracktotal = release.album.tracktotal_on_disc(track.discnumber)

    # it does not make sense to store this in the "common" configuration, but only in the
    # id.txt. we use a special naming convention --> most probably we should reuse the
    # configuration parser for this one as well, no?
    for name, value in release_tags.items():
        if name.startswith("tag:"):
            name = name.split(":")
            name = name[1]
            setattr(metadata, name, value)