Skip to content

Instantly share code, notes, and snippets.

@pkuczynski
Created December 6, 2013 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkuczynski/7822125 to your computer and use it in GitHub Desktop.
Save pkuczynski/7822125 to your computer and use it in GitHub Desktop.
MusicBrainz Picard: converts album date from yyyy-mm-dd to simply yyyy
PLUGIN_NAME = 'Simple date'
PLUGIN_AUTHOR = 'Piotr Kuczynski'
PLUGIN_DESCRIPTION = 'Simplify album date to contain only year.'
PLUGIN_VERSION = "0.1"
PLUGIN_API_VERSIONS = ["0.9.0", "0.10", "0.15", "0.16"]
from picard.metadata import register_album_metadata_processor
import re
def simple_date(tagger, metadata, release):
metadata["date"] = metadata["date"][:4]
register_album_metadata_processor(simple_date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment