keepTags[name] = getattr(metadata, name)

    # remove current metadata
    metadata.delete()

    # set album metadata
    metadata.album = release.album.title

    if split_discs_folder and release.album.disctotal > 1:
        # the fileext should be stored on the album/track as well
        fileext = os.path.splitext(track.orig_file)[1]
        disc_title_extension = release._value_from_tag_format(split_discs_extension, 
            track.tracknumber, track.position - 1, fileext)
        metadata.album = "{0}{1}".format(metadata.album, disc_title_extension)

    metadata.composer = artist
    metadata.albumartist = artist
    metadata.albumartist_sort = release.album.sort_artist
    metadata.label = release.album.label
    metadata.year = release.album.year
    metadata.country = release.album.country
    metadata.url = release.album.url
    # add styles to the grouping tag (right now, we can just use one)
    metadata.grouping = release.album.styles

    # adding two as there is no standard. discogstagger pre v1
    # used (TXXX desc="Catalog #")
    # mediafile uses TXXX desc="CATALOGNUMBER"
    metadata.catalognum = release.album.catno
    metadata.catalognumber = release.album.catno
Пример #2
0
    logger.debug("metadata -> %.2d %s - %s" % (track.position, track.artist,
                 track.title))

    # copy old file into new location
    shutil.copyfile(os.path.join(options.sdir, track.orig_file),
                    os.path.join(release.dest_dir_name, track.new_file))

    # load metadata information
    metadata = MediaFile(os.path.join(
                         release.dest_dir_name, track.new_file))
    # remove current metadata
    metadata.delete()
    metadata.title = track.title.lower()
    metadata.artist = track.artist.lower()
    metadata.album = release.album.title.lower()
    metadata.composer = release.album.artist.lower()
    metadata.albumartist = release.album.artist.lower()
    metadata.label = release.album.label.lower()
    metadata.year = release.album.year
    # adding two are there is no standard. discogstagger pre v1
    # used (TXXX desc="Catalog #")
    # mediafile uses TXXX desc="CATALOGNUMBER"
    metadata.catalognum = release.album.catno
    metadata.catalognumber = release.album.catno
    metadata.genre = release.album.genre.lower()
    metadata.track = track.position
    metadata.tracktotal = len(release.tag_map)

    if embed_coverart and os.path.exists(os.path.join(release.dest_dir_name,
                                         "%s.jpg" % release.album.title)):
        imgdata = open(os.path.join(release.dest_dir_name,
Пример #3
0
    # remove current metadata
    metadata.delete()

    # set album metadata
    metadata.album = release.album.title

    if split_discs_folder and release.album.disctotal > 1:
        # the fileext should be stored on the album/track as well
        fileext = os.path.splitext(track.orig_file)[1]
        disc_title_extension = release._value_from_tag_format(
            split_discs_extension, track.tracknumber, track.position - 1,
            fileext)
        metadata.album = "{0}{1}".format(metadata.album, disc_title_extension)

    metadata.composer = artist
    metadata.albumartist = artist
    metadata.albumartist_sort = release.album.sort_artist
    metadata.label = release.album.label
    metadata.year = release.album.year
    metadata.country = release.album.country
    metadata.url = release.album.url
    # add styles to the grouping tag (right now, we can just use one)
    metadata.grouping = release.album.styles

    # adding two as there is no standard. discogstagger pre v1
    # used (TXXX desc="Catalog #")
    # mediafile uses TXXX desc="CATALOGNUMBER"
    metadata.catalognum = release.album.catno
    metadata.catalognumber = release.album.catno
Пример #4
0
                os.path.join(release.dest_dir_name, track.new_file))
    logger.debug("metadata -> %.2d %s - %s" %
                 (track.position, track.artist, track.title))

    # copy old file into new location
    shutil.copyfile(os.path.join(options.sdir, track.orig_file),
                    os.path.join(release.dest_dir_name, track.new_file))

    # load metadata information
    metadata = MediaFile(os.path.join(release.dest_dir_name, track.new_file))
    # remove current metadata
    metadata.delete()
    metadata.title = track.title
    metadata.artist = track.artist
    metadata.album = release.album.title
    metadata.composer = release.album.artist
    metadata.albumartist = release.album.artist
    metadata.label = release.album.label
    metadata.year = release.album.year
    # adding two are there is no standard. discogstagger pre v1
    # used (TXXX desc="Catalog #")
    # mediafile uses TXXX desc="CATALOGNUMBER"
    metadata.catalognum = release.album.catno
    metadata.catalognumber = release.album.catno

    genre = release.album.genre
    if use_style:
        genre = release.album.styles[0]

    metadata.genre = genre
    metadata.track = track.position