Artist Variables Plugin

picard-plugins
Tags: #<Tag:0x00007fd5e5cbeba8>

#1

Artist Variables [Download]

Overview

This plugin provides specialized album and track variables for use in naming scripts. It combines the functionality of the “Album Artist Extension” and “RDS Naming Variables” plugins, although the variables are provided with different names. This will require changes to existing scripts when switching from the previous plugins.


What it Does

This plugin reads the album and track metadata provided to Picard and exposes the information in a number of additional variables for use in Picard scripts. The plugin has been designed such that the information is presented consistently regardless of whether or not the Use standardized artist names option is selected. This means that some of the information available through the standard Picard tags will be duplicated in the variables provided by this plugin.

NOTE: There are no additional calls to the MusicBrainz website api for additional information.

Album Variables

  • _PriAArtistID - The ID of the primary / first album artist listed
  • _PriAArtistStd - The primary / first album artist listed (standardized)
  • _PriAArtistCred - The primary / first album artist listed (as credited)
  • _PriAArtistSort - The primary / first album artist listed (sort name)
  • _AdditionalAArtistID - The IDs of all album artists listed except for the primary / first artist, separated by a semicolon and space
  • _AdditionalAArtistStd - All album artists listed (standardized) except for the primary / first artist, separated with strings provided from the release entry
  • _AdditionalAArtistCred - All album artists listed (as credited) except for the primary / first artist, separated with strings provided from the release entry
  • _FullAArtistStd - All album artists listed (standardized), separated with strings provided from the release entry
  • _FullAArtistCred - All album artists listed (as credited), separated with strings provided from the release entry
  • _FullAArtistSort - All album artists listed (sort names), separated with strings provided from the release entry
  • _FullAArtistPriSort - The primary / first album artist listed (sort name) followed by all additional album artists (standardized), separated with strings provided from the release entry
  • _AArtistCount - The number of artists listed as album artists

Track Variables

  • _PriTArtistID - The ID of the primary / first track artist listed
  • _PriTArtistStd - The primary / first track artist listed (standardized)
  • _PriTArtistCred - The primary / first track artist listed (as credited)
  • _PriTArtistSort - The primary / first track artist listed (sort name)
  • _AdditionalTArtistID - The IDs of all track artists listed except for the primary / first artist, separated by a semicolon and space
  • _AdditionalTArtistStd - All track artists listed (standardized) except for the primary / first artist, separated with strings provided from the track entry
  • _AdditionalTArtistCred - All track artists listed (as credited) except for the primary / first artist, separated with strings provided from the track entry
  • _FullTArtistStd - All track artists listed (standardized), separated with strings provided from the track entry
  • _FullTArtistCred - All track artists listed (as credited), separated with strings provided from the track entry
  • _FullTArtistSort - All track artists listed (sort names), separated with strings provided from the track entry
  • _FullTArtistPriSort - The primary / first track artist listed (sort name) followed by all additional track artists (standardized), separated with strings provided from the track entry
  • _TArtistCount - The number of artists listed as track artists

Examples

The following are some examples using actual information from MusicBrainz:

Example 1:

Using the single “Fairytale of New York” by Walk Off The Earth (credited as “Gianni and Sarah”), the additional artist variables created are:

  • _PriAArtistID = e2a5eaeb-7de7-4ffe-a519-e18e427a5060
  • _PriAArtistStd = Walk Off The Earth
  • _PriAArtistCred = Gianni and Sarah
  • _PriAArtistSort = Walk Off The Earth
  • _FullAArtistStd = Walk Off The Earth
  • _FullAArtistCred = Gianni and Sarah
  • _FullAArtistSort = Walk Off The Earth
  • _FullAArtistPriSort = Walk Off The Earth
  • _AArtistCount = 1
  • _PriTArtistID = e2a5eaeb-7de7-4ffe-a519-e18e427a5060
  • _PriTArtistStd = Walk Off The Earth
  • _PriTArtistCred = Gianni and Sarah
  • _PriTArtistSort = Walk Off The Earth
  • _FullTArtistStd = Walk Off The Earth
  • _FullTArtistCred = Gianni and Sarah
  • _FullTArtistSort = Walk Off The Earth
  • _FullTArtistPriSort = Walk Off The Earth
  • _TArtistCount = 1

Because there is only one artist associated with this single, the _AdditionalAArtistID, _AdditionalAArtistStd, _AdditionalAArtistCred, _AdditionalTArtistID, _AdditionalTArtistStd and _AdditionalTArtistCred variables are not created.

Example 2:

Using the single “Wrecking Ball” by Sarah Blackwood, Jenni Pleau & Emily Bones, the additional artist variables created are:

  • _PriAArtistID = af7e5ea9-bd58-4346-8f78-d672e9f297f7
  • _PriAArtistStd = Sarah Blackwood
  • _PriAArtistCred = Sarah Blackwood
  • _PriAArtistSort = Blackwood, Sarah
  • _AdditionalAArtistID = 07fa21a9-c253-4ed0-b711-d63f7965b723; 541d331c-f041-4895-b8f2-7db9e27dc5ab
  • _AdditionalAArtistStd = Jenni Pleau & Emily Bones
  • _AdditionalAArtistCred = Jenni Pleau & Emily Bones
  • _FullAArtistStd = Sarah Blackwood, Jenni Pleau & Emily Bones
  • _FullAArtistCred = Sarah Blackwood, Jenni Pleau & Emily Bones
  • _FullAArtistSort = Blackwood, Sarah, Pleau, Jenni & Bones, Emily
  • _FullAArtistPriSort = Blackwood, Sarah, Jenni Pleau & Emily Bones
  • _AArtistCount = 3
  • _PriTArtistID = af7e5ea9-bd58-4346-8f78-d672e9f297f7
  • _PriTArtistStd = Sarah Blackwood
  • _PriTArtistCred = Sarah Blackwood
  • _PriTArtistSort = Blackwood, Sarah
  • _AdditionalTArtistID = 07fa21a9-c253-4ed0-b711-d63f7965b723; 541d331c-f041-4895-b8f2-7db9e27dc5ab
  • _AdditionalTArtistStd = Jenni Pleau & Emily Bones
  • _AdditionalTArtistCred = Jenni Pleau & Emily Bones
  • _FullTArtistStd = Sarah Blackwood, Jenni Pleau & Emily Bones
  • _FullTArtistCred = Sarah Blackwood, Jenni Pleau & Emily Bones
  • _FullTArtistSort = Blackwood, Sarah, Pleau, Jenni & Bones, Emily
  • _FullTArtistPriSort = Blackwood, Sarah, Jenni Pleau & Emily Bones
  • _TArtistCount = 3

Because there are multiple artists associated with both the album and the track, all artist variables are created.

Example 3:

Using the album “Kermit Unpigged” by The Muppets, the additional artist variables created for track 4, “All I Have to Do Is Dream” by Linda Ronstadt and Kermit the Frog, are:

  • _PriAArtistID = 2ca340a6-e8f2-489d-90c2-f37c5c802d49
  • _PriAArtistStd = The Muppets
  • _PriAArtistCred = The Muppets
  • _PriAArtistSort = Muppets, The
  • _FullAArtistStd = The Muppets
  • _FullAArtistCred = The Muppets
  • _FullAArtistSort = Muppets, The
  • _FullAArtistPriSort = Muppets, The
  • _AArtistCount = 1
  • _PriTArtistID = 498f2581-be21-4eef-8756-fbb89d79b1c0
  • _PriTArtistStd = Linda Ronstadt
  • _PriTArtistCred = Linda Ronstadt
  • _PriTArtistSort = Ronstadt, Linda
  • _AdditionalTArtistID = 992a7ea8-96c1-4058-ba96-f811c8d01c77
  • _AdditionalTArtistStd = Kermit the Frog
  • _AdditionalTArtistCred = Kermit the Frog
  • _FullTArtistStd = Linda Ronstadt and Kermit the Frog
  • _FullTArtistCred = Linda Ronstadt and Kermit the Frog
  • _FullTArtistSort = Ronstadt, Linda and Kermit the Frog
  • _FullTArtistPriSort = Ronstadt, Linda and Kermit the Frog
  • _TArtistCount = 2

Because there is only one artist associated with the album the _AdditionalAArtistID, _AdditionalAArtistStd and _AdditionalAArtistCred variables are not created.


EDIT: If there’s any interest in this, please let me know and I’ll submit it to the “official” Picard Plugins repository. Also, I’d really like to know if you encounter any problems with the plugin. Thanks.


Retrieve both standardized- and non-standardized artist names?
#2
  1. Is there really a need for this? Could you explain how you think that this data might be used?

  2. Is there a reason to create a new plugin rather than extending the existing albumartistextension plugin in a backwardly compatible way?


#3
  1. I use it to meet the specific needs of my file naming scripts. I file releases in directories by the standardized name of the primary album artist and place any additional track artists (as credited) in the track filenames. I also check if the primary track artist (as credited) differs from the standardized primary album artist, and if so I include the credited name in the track filename.

  2. I could put the additional functionality in the existing albumartistextension plugin, but since it is exposing information about track artists as well the name would be misleading / incorrect. I could put the track functionality in a new separate plugin, but that would end up essentially duplicating most of the code, which I didn’t think would be efficient. I could make the new “Artist Variables” plugin backward compatible with the existing “Album Artist Extension” plugin, so that it could be used as a drop-in replacement and not require any changes to existing scripts.

NOTE: Based on this, I have canceled the PR to include this plugin in the “official” list of Picard plugins until there is some sort of consensus as to a path forward. It will remain available at the download link shown above.


#4

I’m going to run it against some of my albums to see what it does with albums I know, because I’m intrigued. I’m guessing I’m not the target demographic because I use a database-based media manager, and have little need for complex naming schemes.

I’m wondering about how this would fit with the Performer tags? At first glance it looks like it’s just replacing “Performer” with “Track artists,” and stripping out the instrument?


#5

It’s actually not touching the “Performer” tags at all, nor any of the recording relationships. Mostly what it’s doing is exposing additional information about the Album Artist(s) and Track Artist(s) in the form of new variables. The only thing that’s different is that it’s also placing the primary (first) artist in a separate variable, and the additional (remaining) artists in another variable if there is more than one artist. This is done for both the Album Artists and Track Artists, and then provides a couple of choices for sort order. I tried to capture what’s happening in the examples provided.


#6

Good job. I can confirm that it appears to work as intended.