Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1808

Unable to load plugin using examples in api documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • None
    • Plugins, Plugins API
    • None

      Attempting to add start using an example plugin to get going on a personal update plugin. Using register_track_metadata_processor throws an error message, and I'm not using any changes from the example doc.

      First of all, based on the docs I cannot figure out how to get the error logs, but also the plugin should work since it's in the example docs. 

       

      PLUGIN_NAME = 'Custom Formatting'
      PLUGIN_AUTHOR = 'Jonathon'
      PLUGIN_DESCRIPTION = "Update the title, artist, albumartist, album, and album sort with custom formatting."
      PLUGIN_VERSION = '1.0'
      PLUGIN_API_VERSIONS = ['2.1', '2.2']
      PLUGIN_LICENSE = "GPL-2.0-or-later"
      PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"
      
      from picard.metadata import register_track_metadata_processor
      import re
      
      def remove_featartists(tagger, metadata, track, release):
          metadata["title"] = re.sub(r"\(feat. [^)]*\)", "", metadata["title"])
      
      register_track_metadata_processor(custom_format)
      

       

            Unassigned Unassigned
            TheCommensuratePup Jonathon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package