Help - Search - Members - Calendar
Full Version: Format Discogs "Extra artists" field
Mp3tag Forums > Mp3tag - International > Support
KeyMs92
When I import the Discogs "Extra artists" field, I get e.g. this:

Composed By: Russell, Morrison; Lead Vocals: Ringo; Vocals [+]: Paul

I'd like to extract only the composer(s) and get this:

Russell; Morrison

Of course one can assume that the credits are not always in the same order. Also, "Composed By" will sometimes be called "Written By" or something else.

I'm pretty sure which expressions I have to use. It just doesn't quite 'fit' yet. Any ideas?
pone
Assuming you want to extract from the MIXARTIST field and write into the COMPOSER field:

Action: Format Value
Field: COMPOSER
Formatstring: $if($eql($regexp(%mixartist%,.*(Composed By|Written-By|Written By).+,yes),yes),$replace($regexp($regexp(%mixartist%,'.*(^|; )[^:]*(Composed By|Written-By|Written By)[^:]*: (.+?(;|$)).*',$3),;$,),',',;),%composer%)


The next update of my discogs script will have some nice options which go into this direction.
See here for the different credit expressions from discogs: http://www.discogs.com/help/creditslist


Note that earlier versions of my script wrote "Composed By - Russell..." instead of "Composed By: Russell, ..."
KeyMs92
Thanks, works perfectly! smile.gif
It would indeed be nice if this was integrated into the script. I think many people use this format for listing artists/composers.

Out of curiosity, do you know of a way to easily compare the composers listing with other sources, Allmusic in particular? As I understand it there's no way to import Allmusic data in Mp3tag. If there was, it would be easy to export both composer listings and compare them in a text comparer tool.

Usually, I work by using the Discogs tags as a starting point and then compare them with other sources. Most of the tags can easily be done manually, except the 'per-tag' tags like 'title' and 'composer'.
pone
ZITAT(KeyMs92 @ Mar 9 2012, 16:59) *
Thanks, works perfectly! smile.gif
It would indeed be nice if this was integrated into the script. I think many people use this format for listing artists/composers.

Out of curiosity, do you know of a way to easily compare the composers listing with other sources, Allmusic in particular? As I understand it there's no way to import Allmusic data in Mp3tag. If there was, it would be easy to export both composer listings and compare them in a text comparer tool.

Usually, I work by using the Discogs tags as a starting point and then compare them with other sources. Most of the tags can easily be done manually, except the 'per-tag' tags like 'title' and 'composer'.



I have no idea how to compare data with Allmusic. As far as I know, it is forbidden to post Allmusic web sources scripts in Mp3tag, because they have complained against scripts running on their page.
KeyMs92
The only problem is that Discogs distinguishes between extraartists per track and per album. On the release page the latter group is the credits. This means only the composers that are listed as extraartists per track are retrieved.

Is there are already an action script available that extracts the composers from the credits and writes it to the tracks? (If there is, it must be a pretty complicated one!)
pone
ZITAT(KeyMs92 @ Mar 18 2012, 12:02) *
The only problem is that Discogs distinguishes between extraartists per track and per album. On the release page the latter group is the credits. This means only the composers that are listed as extraartists per track are retrieved.

Is there are already an action script available that extracts the composers from the credits and writes it to the tracks? (If there is, it must be a pretty complicated one!)


I know it's complicated. For the new discogs script I'm also trying to get it from both sections. I don't think it will work completely without mistakes, but I'm getting pretty close.
I will take a few days until I upload the script. It has got pretty complicated and I have to do a few other things in that thing called "real life".


Anyway, for your action, try this:

Action 1: Format Value
Field: COMPOSER
Formatstring: $if($eql($regexp(%mixartist%,.*(Composed By|Written-By|Written By).+,yes),yes),$replace($regexp($regexp(%mixartist%,'.*(^|; )[^:]*(Composed By|Written-By|Written By)[^:]*: (.+?(;|$)).*',$3),;$,),',',;),%composer%)

Action 2: Format Value
Field: COMPOSER TEMP
Formatstring: $if($eql($regexp(%credits%,.*(Composed By|Written-By|Written By).+,yes),yes),$replace($regexp($regexp(%credits%,'.*(^|; )[^:]*(Composed By|Written-By|Written By)[^:]*: (.+?(;|$)).*',$3),;$,),',',;),)

Action 3: Format Value
Field: COMPOSER
Formatstring: %composer%$if($and(%composer%,%composer temp%),; ,)%composer temp%

Action 4: Remove Fields
Fields: COMPOSER TEMP

Note that I have used %credits% in the second action. Use the tag-field there where you have stored the album credits.
KeyMs92
Hmm... If I put the actions in a seperate action group and apply the action group to the files (all with CREDITS tag) nothing is written to the composer tag. Maybe I'm missing something...

Could you try out this release and see if it works? Thanks again wink.gif
pone
ZITAT(KeyMs92 @ Mar 20 2012, 10:27) *
Hmm... If I put the actions in a seperate action group and apply the action group to the files (all with CREDITS tag) nothing is written to the composer tag. Maybe I'm missing something...

Could you try out this release and see if it works? Thanks again wink.gif


There was a typo in my post above. i've written "%composter temp%" instead of "%composer temp%" in Action 3.

Please fix that in your action and check again.
KeyMs92
QUOTE
There was a typo in my post above. i've written "%composter temp%" instead of "%composer temp%" in Action 3.

Thank you! I think it's now working as you planned've it to: It adds the formatted "mixartist" to "composer" for certain tracks and then appends the formatted "credits" tag for each track.

I purposely said "as you've planned it to" because some things can still be improved, although I realize it would be a hell of a job to do smile.gif

It mainly has to do with the formatting of "credits". Mostly, Discogs uses a structure like:

CODE
[artist] (tracks: #-#, #-#), [artist] (tracks: #-#, #, #) etc.


or

CODE
[artist] (tracks: # to #, # to #), [artist] (tracks: # to #, #, #) etc.


and probably there are many more variations.

There would have to be a way, based on the info inside the brackets, to only write the credit composers to the applicable tracks. I don't know if this is at all possible, or maybe you're already working on it, but let me know what you think!
pone
ZITAT(KeyMs92 @ Apr 18 2012, 15:38) *
It mainly has to do with the formatting of "credits". Mostly, Discogs uses a structure like:

QUELLTEXT
[artist] (tracks: #-#, #-#), [artist] (tracks: #-#, #, #) etc.


or

QUELLTEXT
[artist] (tracks: # to #, # to #), [artist] (tracks: # to #, #, #) etc.


and probably there are many more variations.

There would have to be a way, based on the info inside the brackets, to only write the credit composers to the applicable tracks. I don't know if this is at all possible, or maybe you're already working on it, but let me know what you think!


I have thought about that some time ago, wanted to build that directly into the web script, but came to the conlusion that it is not possible in an reliable way.
There are to many variations in the way these track references are written. And not only the track references, also the track numbers themselves have variations (1, 2, 3, .... / a1, a2, b1, ... / 1, 2.1, 2.2, 3, .... / 1-01, 1-02, 1-03 / ...).
I even came upon a few pages, were the numbering system in the tracklist has been changed by some discogs usere, but not that of the track references in the credit section.
KeyMs92
QUOTE (pone @ Apr 18 2012, 16:58) *
I have thought about that some time ago, wanted to build that directly into the web script, but came to the conlusion that it is not possible in an reliable way.
There are to many variations in the way these track references are written. And not only the track references, also the track numbers themselves have variations (1, 2, 3, .... / a1, a2, b1, ... / 1, 2.1, 2.2, 3, .... / 1-01, 1-02, 1-03 / ...).
I even came upon a few pages, were the numbering system in the tracklist has been changed by some discogs usere, but not that of the track references in the credit section.


Yeah, it's definitely Discog's fault: their syntax is simply to loose to be reliable for database usage. I've never understood the distinguishing between credits and extra artists (aren't they credited..?). If the idea is to distinguish between per-track cast members like and per-album cast members, they should only include people in "credits" that have worked on the whole album. That said, I don't really like that solution either.

Alternatively they could do all credits per track. This is better but it still feels rather awkward, e.g. the album art designer mentioned on each track? It would also lead to much redundancy. Personally, I prefer something like this:

CODE
<albumTitle>The Extremist</albumTitle>
<TrackList>
    <Track>
        <No>1</No>
        <Title>Friends</Title>
    </Track>
</Tracklist>
<Credits>
    <Role>
        <Name>Producer</Name>
        <Members>
            <Member>
                <Name>John Cuniberti</Name>
            </Member>
            <Member>
                <Name>Andy Johns</Name>
                <WorkedOn>
                    <Track>1</Track>
                    <Track>3</Track>
                </WorkedOn>
            </Member>
        </Members>
    </Role>
</Credits>


No tracks are mentioned when a person works on each track.

Anyway, this is all fantasizing rolleyes.gif It just a shame that they don't have better standards considering have so much information on offer...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.