Console based audio-file metadata tagger that uses the API v2 (JSON based). Relies on the Mutagen and discogs-client libraries. Currently supports FLAC and MP3 file types.
Branch: master
Clone or download
Pull request Compare This branch is 172 commits ahead, 40 commits behind jesseward:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status Coverage Status

What is it

discogstagger2 is a console based audio meta-data tagger. Release data is retrieved via the API.

discogstagger2 is based on the great work of jesseward.

Simply provide the script with a base directory, that contains an album consisting of either FLAC or MP3 media files and the release-id. discogstagger2 calls out to the API and updates the audio meta-data accordingly.

If no release-id is given, the application checks, if a file "id.txt" exists (the name of this file can be configured in the configuration) and if this file contains a specific property (id_tag). If both is true the release-id from this file is used. This is useful for batch processing.

During the process, album images (if present and if configured) are retrieved from the API. To avoid a huge damage to your RateLimit, you can configure, that only the cover image and not all are loaded from the Discogs servers. As well, a play-list (.m3u) and an information file (.nfo) are generated per each release.

Optionally discogstagger will embed the found album art into the file meta data

For detailed configuration options, take a look in the conf/default.conf file, there you will be able to see default values as well as a short explanation for each config option.

Develop on discogstagger

If you are developing on discogstagger, please do not forget to check, if the given tests (and you should add your own unit tests as well) are still running, by invoking

invoke test


  • Mutagen for easy accessing meta-tags
  • discogs-client for access to the discogs api
  • requests for access to the discogs api ;-)
  • nose for unit tests
  • mako for easy templating (e.g. nfo and m3u files) >=0.8.1
  • rauth for oauth authentication to discogs
  • coverage for coverage reporting
  • invoke to make running tests easier

discogstagger is also packaging/reusing the MediaFile library from the "beets" project. This package is already externalized in beets, but we have adopted this package and are therefor providing our own version.


Fetch the repo from github

git clone

Install the script requirements

sudo pip install -r requirements.txt

Run through set-up script

sudo python install


DiscogsTagger always loads the default options from the conf/default.conf file, furthermore, you are able to overwrite those using your own file, which can be given on the command line using the '-c' switch.

The default configuration file must be present to execute the script. The default settings (as shipped), should work without any modifications.

Note that you may wish to modify the following default configuration options. The defaults are shipped as such in attempt to be as non destructive as possible

# True/False : leaves a copy of the original audio files on disk, untouched after
# Embed cover art. Include album art from in the metadata tags

To specify genre in your tags, review the use_style option. With use_style set to True, you're instructing discogstagger to pull the "Style" field. The style field is typically more genre specific than the discogs "Genre" field. In the example below (40522), with use_style=True, the genre field is tagged as "House".

Use Discogs "style" elements instead of the genre as the genre Meta-Tag in files (True)
Style = House
Genre = Electronic

To keep already existing tags, you can include these tags in the configuration as well. Usually Rippers (e.g. RubyRipper) do include the freedb_id, which could be kept using the following configuration. The list of all tags could be taken from the file discogstagger/ext/

# Keep the following tags

Furthermore you can use lowercase directory and filenames using the following configuration:

# Use lowercase filenames

For batch-mode tagging, it is not necessary anymore to provide the release-id via the '-r' parameter on the commandline. The same is possible by using a file (by default: id.txt) with the following structure:


The name of this file and the name of the id tag can be configured in your configuration file as well.

# batch
# if no release id is given, the application checks if a file with the
# name id_file (in this case id.txt) is in the source directory,
# if it is there the id_tag is checked (discogs_id) and assigned to the
# release id

# source
# defines a mapping between the name of the source and the corresponding
# id tag in the media file

All command line options are shown, if the program ( is called without any further command line options. Please note, that we are using python 2.7.

The command line takes the following parameters:

Usage: [options]

  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -r RELEASEID, --releaseid=RELEASEID
                        The release id of the target album
                        The directory that you wish to tag
  -d DESTDIR, --destination=DESTDIR
                        The (base) directory to copy the tagged files to
                        The discogstagger configuration file.
  --recursive           Should albums be searched recursive in the source
  -f, --force           Should albums be updated even though the done token
  -g, --replay-gain     Should replaygain tags be added to the album?
                        (metaflac needs to be installed)