[WS] Discogs (pone mod)


#21

Amazing work on this script! Thanks for taking the time! /WJ


#22

I'm thinking about stripping off the double tagging for this script.

I would abandon ALBUM ARTIST and keep ALBUMARTIST.
And I would abandon COMMENT and keep CATALOG #.

People who don't like this changes could remap their tag fields in mp3tag at menu > tools > tags > mapping.
Or they can edit my scripts, of course. But they would have to edit it again at every update.

Any thoughts about that? Are their any users of this script whose mp3 collection would get muddled by this change?


#23

I'm still using 2.3, sorry if anything I say is irrelevant. I guess I'll hold on from upgrading until you've made your decision :slight_smile: I'm going to refer to ID3 specification a few times. I'm aware there are other tag specifications out there, it's just that ID3 is most widespread.

The ID3 design between TPE1/TPE2/TPE3 fields is quite clear on their difference. Then again, ID3 specification doesn't even feature an actual "Album Artist" tag field x) I believe people rarely bother to use ARTIST field for the lead singer and BAND for the actual band, this is propably what Florian was thinking when he decided to change BAND->ALBUMARTIST.

I wouldn't have BAND fields unless your script updated them, and I usually have the exact same information in all your three tags. We do need an extra tag when track artist and "global artist" do not match, so BAND will be abused for this requirement from now on. A third tag is unnecessary. Mp3Tag doesn't feature spaces in any other internal tag fields, so your field is kind of a lone monster in there, anyway. I support removing ALBUM ARTIST.

I also support removing COMMENT regarding catalogue numbers, but I'd like to say something about the tag field in general:

Personally, I edited your script to put release notes in COMMENT instead of LYRICS since that's what ID3 COMM is for, and I never understood why you wanted to create a separate field for it. Furthermore, I don't understand what LYRICS is? Does Mp3Tag create a Lyrics3 tag out of it? This would only be compatible with ID3v1. Otherwise ID3v2 has USLT -> UNSYNCHEDLYRICS in Mp3Tag and SYTL/SYTC for synched lyrics. Vorbis Comments, for example, doesn't have lyrics at all.

I am aware a lot of your tags do not conform with any standards, in any case I use foobar2000 at home so I can handle, sort and search with any tag I want. I presume dano/pone scripts never had iTunes/WMP/etc users in mind.

This comments/lyrics thing just always struck me as odd, since most hardware players do not even attempt to read these fields, but do read ID3 COMM field - enabling you to see some trivia about the record playing. I'm propably nitpicking, but this is just a thought on compatibility. I see no reason for a person taking his or her MP3s on the road to require catalogue numbers; home users or DJs would have a computer, so they can search it from CATALOG # implemented here.

However, some trivia might be nice while you're letting another person listen to a cool track off your iPod. If you're not going to use COMM for the catalogue anymore, do consider making the switch from LYRICS to COMMENT for release info :slight_smile:

Last but not least, I see you're mainly worried your changes might cause harm to some users. You wouldn't be rewriting the functions within the code, but removing parts of it: just comment it out and include directions on how to bring it back? Since Mp3Tag can edit tag names just as easily as fields themselves, updating the collection to these new changes is child's play.


#24

Oh wait, I got one more since I came here. This one's a bug report:

The vertical bar | gets parsed as a slash / when data is retrieved from Discogs. This is mainly (or only?) evident when grabbing data for the M|A|R|R|S release (try here).

I presume this applies to dano script also, just reporting it here since this version's the one I use. A bug of smallest possible importance, but a bug anyway :slight_smile:


#25

Thank you for your answer. Nice to see that people are using my script.

When I first wrote this script I was using WinAmp am my goal was to get the information from dano's script and some extras into tag which WinAmp could read.
That's why I wrote the Catalog Number into Comment. (I'm a maniac collector of elctronic music and just like it if I can sort my label collections acording the catalog number).
And I displayed the Discogs Notes & Comments in USLT/UNSYNCEDLYRICS because it is the only field where multiline comments can be displayed without opening some a extra file properties dialog. (I never used LYRICS, when I wrote this at some places above i was just a little uncorrect).
I used BAND (now ALBUMARTIST) and ALBUM ARTIST because I have seen it like that in dano's script and just kept it. I chose to write it also for single-artist releases because WinAmp used to autocomplete the TPE2 column if it was empty with the TPE1 value.

Somewhere in between I switched to foobar and was more than happy to be able to display every tag i want. But I kept a lot of thing in the script for consistency. And it was only after Florian's switch of the name for TPE2 from BAND to ALBUMARTIST, that I understood the concept of frames behind tag names, that there are some standard and the others are TXXX:...

So the none standard tags of my script are:
Album Artist
Discogs_Release_ID
Discogs_Mediatype
Catalog #
Country
Track Temp

I think I will remove ALBUM ARTIST. I will keep the rest as I think these are usefull informations and there are no standard fields for them as far as i know. CATALOG # is used by some online music shops, so it's a quite common non standard tag.

The misused tags/frames are:
Albumartist / TPE2
Comment / COMM
Mixartist / TPE4
Unsyncedlyrics / USLT

I will stick to Albumartist/TPE2 as it is the common tag for it in most players. I will also keep it for single-artist releases, because I only see disadvantages of having it not there.

I only recently discovered that there is the standard tag INVOLVEDPEOPLE/IPLS which is made for exactly the thing i used MIXARTIST/TPE4 now. It is thought to be filled like this: Role1:Person1;Role2:Person2;.. for example: Remixer:Arist 1;Keyboards:Artist2;... I could write the script to present the information which is now in MIXARTIST/TPE4 like this. But as I tested the tag (without script), I could no get Mp3Tag to write it in such a way that foobar could read it correct. If somebody could help me with that, i could change that.

I would like to remove Comment/COMM completly as there are often interesting informations which are overwritten by my script. And since I can display CATALOG # now, I don't need it anymore.

I will stick to UNSYNCEDLYRICS/USLT for Discogs Notes & Credits because I just like the way they are displayed with a Lyrics Plugin in almost all software players.
This reflects of course my personal taste. Others won't like it that my script overwrites their lyrics when present. I never have made the effort to collect lyrics for my music, so I don't care much about that.
If there is any way to read multiline fields in foobar without opening a extra file properties dialog, I would think about writing Discogs Notes & Credits in to an extra custom field.

As you said, people can edit the tag name in mp3tag and also edit my script to redirect the output to other tags. I just wanted to hear what people think about it to avoid bad surprises for the users of the script.


#26

That's deliberate, because | is used by the script to mark the beginning of the next value when writing the track information. M|A|R|R|S would written "M" to artist, "A" to title, "R" to _lenght and "R|S" to mixartist if | was not replaced with /.
I think i took this from dano's script.


#27

Agreed. I didn't know Winamp updates it automatically, I stopped using it after 2.95 or so. In any case, it's no good sortingwise if some files feature a tag field but others don't, so if the script uses it at all it should be a constant.

I did some testing, and searched through fb2k forums. Didn't get very far though, posts regarding IPLS are mainly from 2006. It seems foobar2000 simply has trouble supporting IPLS (without third-party components?) I might try my luck again tomorrow or so. I did see %involvedpeople% variable in one post, but have no idea how far fb2k supports it. My quick attempt at creating a custom column for it yielded no results.

However, do consider the situation with TPE2: as no one really updates the tag with Band information using TPE2 for Album Artist has become the de facto standard, no matter what the ID3 specification says. In a similar notion, it seems counterproductive to enforce the "right" tag instead of TPE4, when using it requires extensive work and even sophisticated players have trouble supporting it. TPE4 works out of the box like intended.

Personally, my files have multiple TPE1/2 fields with all involved artists in order of importance like this:

[TPE1]Artist Alias featuring Singer[/TPE1]
[TPE1]Artist[/TPE1]
[TPE1]Singer[/TPE1]
[TPE1]Mixartist[/TPE1]
[TPE2]...

I have no idea if having multiple TPE1/2 fields are "allowed" in ID3 specs (nor do I know, if GENRE is allowed either). Still, this works like a charm regarding foobar, since all music one artist is featured on will always have one tag, where I keep writing him/her exactly the same across multiple files. Using a consistent name is especially important with certain electronic musicians, who might have used some 50 aliases during their career.

Foobar is quite happy with multiple tag fields with the same name. I cannot guarantee Itunes/Winamp/WMP wouldn't choke if you feed them the file, though. Anyway, this method is the only one I know to prevent an artist getting hidden behind multiple "featuring", "versus", "remix", etc combinations. I'm pretty sure this could be easy to automate within a script like yours, but haven't given it that much thought due to lack of coding skills. I'm updating those tags by hand.

Multiline tag fields are essentially the same, only their name changes. This could be done by simply modifying a lyrics plugin, I believe foobar has some script-based ones around. I'm no expert on the matter, though. If overwriting is the main problem here, couldn't the script be modified to append to a field, instead of replacing it?

In any case, as I said before I see no need to add catalogue numbers to COMM, if it is already in CATALOGUE #. If the tag is in use by commercial vendors it's already more or less de facto standard regardless of ID3 spec. If you want to keep using USLT for release notes and CATALOGUE # for cat information, COMM becomes irrelevant.

I guess most people are less enthusiastic about the information aspect, they just want their music fix :slight_smile: I suspect not many commoners frequent on these forums, either. I only checked if ponemod has a new version out, since I had to come here to update Mp3tag. The script simply works so well, there is not much room to make requests or complaints.


#28

That's also the way i think about it.

QUOTE
Personally, my files have multiple TPE1/2 fields with all involved artists in order of importance like this:
[TPE1]Artist Alias featuring Singer[/TPE1]
[TPE1]Artist[/TPE1]
[TPE1]Singer[/TPE1]
[TPE1]Mixartist[/TPE1]
[TPE2]...

I have no idea if having multiple TPE1/2 fields are "allowed" in ID3 specs (nor do I know, if GENRE is allowed either). Still, this works like a charm regarding foobar, since all music one artist is featured on will always have one tag, where I keep writing him/her exactly the same across multiple files. Using a consistent name is especially important with certain electronic musicians, who might have used some 50 aliases during their career.

Foobar is quite happy with multiple tag fields with the same name. I cannot guarantee Itunes/Winamp/WMP wouldn't choke if you feed them the file, though. Anyway, this method is the only one I know to prevent an artist getting hidden behind multiple "featuring", "versus", "remix", etc combinations. I'm pretty sure this could be easy to automate within a script like yours, but haven't given it that much thought due to lack of coding skills. I'm updating those tags by hand.


I know the problem of various artist aliases and various ways to write these aliases.
With the script I can get only information which is stored at the release page at discogs. And this is only the alias used for this release plus the main way to write it when an alternative way is used for the release. When I first wrote the script I thought I will use always the main way to write it. But after scanning through discogs release pages I desided against it. Because there are some artist whose discogs main spelling is very uncommon, e.g. Len Faki is called Levent Faki at discogs. And other names which I would describe as different aliases are regarded by discogs as a spelling variation of the same alias, e.g. Len Series is regarded by discogs of a name variation of Levent Faki.
I'm thinking about getting the main variation of a discog name in an extra tag for a long time. I would call that tag MAIN NAME SPELLING or simply AKA. But I don't feel it's really necessary, so I haven't done yet.
At the moment I just take what discog gives me. This is the way the name is presented on the actuall physical release, what I take as a way of artistic expression of the artist if he has different ways to write his name. And as such i respect it and don't change it.
This is quite a mess for the media library of course. But I rarely do manual changes on the artists name. From time to time I add a different alias of the artist into MIXARTIST when I have the feeling I would never remind again that alias x is artist y.

I must confess I didn't check proper before. Going through the settings of the lyrics plugin I had already installed (Lyrics Show Panel 2 / foo_uie_lyrics2) I see now that I can choose every tag I want to be displayed.
Appending information to an existing field is not possible with web sources scripts in Mp3Tag. Maybe this would be the perfect solution.
Dano's original script stored this into DISCOGS_CREDITS and DISCOGS_NOTES. Seeing now that i could display every field i want in foobar as multiline filed, I could combine this into something like DISCOGS_NOTES_&_CREDITS. Personally I don't care much, but I would have to run a format value action over a big amount of files to get my already tagged files into the new format. Also it was the original idea of my script to get the basic information into tags which most players can read. But on the other side notes & credits are not that basic.
So I would prefer to keep it the way it is. Would be interesting what other users of the script think about it.

Thank you very much!!!


#29

Update 2.5:

Another Update.
The main changes are that i removed ALBUM ARTIST and COMMENT from the script, and added a version of the script for those don't like the changes of tag field names since Mp3Tag v2.46d. I didn't think this is necessary, but as I watched the download numbers of both versions of my script before, I noticed that the old version had roughly as many downloads as the new one.
The other changes are mainly to optimize the different search modes.

Here are all changes in detail:

CHANGED: I removed the tag ALBUM ARTIST and COMMENT from the script. Both tags just repeated information which was already stored in other tag, ALBUMARTIST and CATALOG #, to name them.

NEW: A complete version of the script as extra download which uses BAND instead of ALBUMARTIST for the people who don't want the update of the newest Mp3Tag version.

NEW: The List of Search Results dialog of the search scripts shows now if the release has a cover picture or not. This does not work for the api-list scripts

NEW: Another search script: Search by (Album)Artist. Can be usefull if you have only a discogs arist name variation and do not know the discogs main artist name, as in that case you don't get results in the API-List for the artist.

CHANGED: I renamed some of the scripts for a better descibing of the way they search.

CHANGED: In "search by label and cat #" " ", "-" & "#" are deleted for search. This gives you better search results.

CHANGED: %artist% & %publisher% which begin with "The" are transformed into "Name, The" for search in "API-List Artist" & "API-List Label"

CHANGED: %albumartist% & %artist% which begin with "The" are stripped off the "The" for search in the five "Search by (Album)Artist + ..." scripts.

CHANGED: if %albumartist% is "va" it will be changed to "Various" for search in the four "Search by Artist + ..." scripts.

CHANGED: in the four search scripts which use %album%, %album% is stripped off everything in and after brackets () & [] and "-" & "_" are replaced by " ".

FIXED: Standard Search failed before when discogs master release pages were found. Now they are shown and can be chosen for preview in browser, but not parsed by the script.

FIXED: artist & titles were mixed up when a track artist was given only for some tracks. (basically these are wrong formated discogs sites, e.g. here: http://www.discogs.com/release/1661911 ). Now the script takes the albumartist as artist for those tracks with missing track artist.

FIXED: in the html discogs adds some extra spaces in the middle catalog numbers which are not visible on their pages. these spaces are cleaned out now by the script.

FIXED: if the albumartist has " - " in it, the script has added the last part of the albumartist to the album before. now they are splitted correctly. Example Pages which made problems before:
http://www.discogs.com/Gut-Bargeld-Die-Son.../release/211040
http://www.discogs.com/Farmlopez-The--A-%C.../release/877466
http://www.discogs.com/A-Joy-Projects-Splash/release/123766

TECHNICAL CHANGES:

  • The API scripts use now my own API key. Before I copied the one form dano's script because I had no idea what a api-key is and how to get it.

  • The way how the script checks if there are more than one genres is much simpler now. Maybe this results in a faster script.

  • The splitting of the tracklist parsing into a VA-mode and a Single-Artist-Mode has been changed to one parising for all releases.

  • I had been over exactly with writing comments into the script where I changed what and what each line does. I removed most of them in favor of a clearer structur of the script.

  • see starting post for download -


#30

These scripts are amazing!

I am using Search by (Album)Artist + Title
Is there a way to reduce the number of search results?

I would like to skip a search result if the year is missing or there is no cover.
I would also like to sort by year ascending.

How do you code this?


#31

http://help.mp3tag.de/main_online.html
http://help.mp3tag.de/options_format.html#regexp
But these are only a very basic helps. To see some examples read through the forum and read the scripts.

Open the script with a text editor. Then open the source code of a discogs search page and a discogs release page. If you compare the scripts with the source code of the discogs pages, you can see how the script navigtes through the pages.

Why do you want to reduce the number of results?
If you have over 20 results and want to few the next results, you can do so by appending &page=2 to the search querry. And &page=3, &page=4, &page=5, ... for more results.

You can sort the search results by any category by clicking on headline of the corresponding column in the "list of search results..." dialog. The initial sorting is the the way discogs.com shows the results on their advanced search page. This can't be changed.

Skipping results can be done by editing the script. Cover is easy as it is the first thing the script checks for every results. Year is more tricky because the script has already gathered some output from the release for the results dialog when it checks year.

To skip one result without cover, replace this part of the script:

    # Cover
    findline "lass=\"number\""
    moveline 1
    if "<div class=\"thumb\""
    say "Cover"
    else
    say " - "
    endif
    say "|"

with this:

    # Cover
    findline "lass=\"number\""
    moveline 1
    if "<div class=\"thumb\""
        say "Cover"
    else
        findline "<div class=\"search_result" 1 1
        unspace
        findline "lass=\"number\""
        moveline 1
        if "<div class=\"thumb\""
            say "Cover"
        else
            say " - "
        endif
    endif
    say "|"

This skips only one result without cover.

To skip two or more in a row, replace

        say " - "

in the new code with

        findline "<div class=\"search_result" 1 1
        unspace
        findline "lass=\"number\""
        moveline 1
        if "<div class=\"thumb\""
            say "Cover"
        else
            say " - "
        endif

as many times as you want to skip results without cover.
But all this doesn't enable you to show other releases instead of the skipped releases. The script is always scanning a advanced-search-result-page at discogs.com and that only displays 20 results at once.
The only advantage of skipping result i can think of is to eleminate all but one results so Mp3tag skips the "list of search results..." dialog and you don't have to click the "Next" button.


#32

@everyone:
I have noticed that the albumartist "Various" is no more changed into "va" since the last update of my script. I will fix that soon.


#33
findline "<div class=\"search_result"
do            
   # Cover    
   findline "lass=\"number\""    
   moveline 1

   if "<div class=\"thumb\""
      findline "class=\"search_release_stats\""
      findinline ">"
      # Year
      
      if "19"
         moveline -3
      else
         if "20"
            moveline -3
         endif
      endif
       
      if "<div class=\"thumb\""
         say "Cover"
         say "|"    
         findline "class=\"data\""

         joinuntil "</div>"
         killtag "em"
         killtag "/em"
         regexpreplace "\s{2,}" " "
    
         # URL
         findinline "<a href=\""
         sayuntil "\">"
         say "|"
    
         # Artist
         movechar 2
         sayuntil " - "
         say "|"
    
         # Album
         movechar 2
         sayuntil "</"
         say "|"
     
         findline "class=\"search_release_stats\""
         findinline ">"
    
         # Year
         saynextnumber
         say "|"
    
         # Format
         findinline "</span>"
         sayuntil "<"
         say "|"
           
         # Publisher
         findinline "</span>"
         sayuntil "<"
         say "|"
    
         # Catalog
         findinline "</span>" 1 1
         sayuntil "<"
         say "|"
    
         # Info
         killtag "em"
         killtag "/em"
         findinline "<div>"
         sayrest    
         saynewline
         exit

      endif
   endif

   findline "<div class=\"search_result" 1 1
   unspace
 
while "<div class=\"search_result" 250

#34

nice, you solve everything you wanted.


#35

I'm wondering if there is a script or tool to create a link to a different website.

I've seen the tools on the site but not sure how to get it to connect or pull data from another location.

The site is Artist Direct - www.artistdirect.com.

I've found it has the most uptodate info on old and new albums.

Current, I'm just doing a cut/paste into Mp3Tag for Credits and Performers info.

Is there a short cut script that I can use to get the data.

Thanks


#36

Hey Pone,

I am using your script very excessive and I am very happy with it, since I did some tweaking for my needs.

I see that "Genre" is a multi value field. There is no prblem with that. But "Catalog #" & "Publisher" are not a Multi value field even if there are multiple values present.

It is alwas diplayed like this:

Publisher:
Eye Q Records\\\\WEA Musik GmbH
Catalog #:
4509 96216-2\\\\4509 96216-2

Yes I did save it an extra time and yes I looked under "Erweiterte Tags".

Is it possible to modife them also to multi value fields?


#37
QUOTE (FreaQ @ Feb 14 2011, 10:43) <{POST_SNAPBACK}>
Hey Pone,

I am using your script very excessive and I am very happy with it, since I did some tweaking for my needs.

I see that "Genre" is a multi value field. There is no prblem with that. But "Catalog #" & "Publisher" are not a Multi value field even if there are multiple values present.

It is alwas diplayed like this:

Publisher:
Eye Q Records\\\\WEA Musik GmbH
Catalog #:
4509 96216-2\\\\4509 96216-2

Yes I did save it an extra time and yes I looked under "Erweiterte Tags".

Is it possible to modife them also to multi value fields?

That's strange. If they are displayed like this, they should be written as Multi Value Fields. On my system they are.
Is there any way you can write multi value fields in these tag fields in MP3tag without my script?


#38

I can add "Publisher" and "Catalog #" as many times as I want.

And if I fill in String1\\String2 manually and save it, it will be written as multiple tags. Just from the script it is not working.
I will have a closer look.

Edit:
Ok. It also works for me.

I have to do an additional step.
"Publisher" and "Catalog #" will not be written in multiple fields just by CRTL-S.
I have to open "Erweiterte Tags" and hit OK. Nothing else.

For Genre it works with CRTL-S. This maybe because Genre is in the left mask.


multivalue tags für foobar2000 mit discogs script
#39

This is a possible explanation.
I have added "Publisher" and "Catalog #" to the tag panel at the left, so I never experienced the difference.

To add fields to the tag panel:
Tools > Options > Tag-Panel > :mt_new: Add Field... >
Field: PUBLISHER / CATLOG #
Name: whatever you like

Maybe it's enough when you add it to the columns in the main file window:
View > Customize columns > New
Name: whatever you like
Value %publisher% / %catalog #%
leave "Field" and "Sort by" empty


#40

Columns do not work. I have them there already.

But adding the fields to the Tag Panel was the solution. Now it works with CRTL-S