Discogs (pone mod) no longer works

I was able to edit the stock mp3tag script for searching Discogs by ID # to my liking but would like the WWW to display w/o the full album name in URL just the #, i.e. https://www.discogs.com/release/14956407
rather than:
https://www.discogs.com/release/14956407-Andreas-Tilliander-Case-Studies-For-Buchla-Volume-One
Is there a way to edit it to do so? Discogs (pone mod) did before it stopped working.

Until someone will adjust a script to your needs, you could use an Action and remove the part with the minus after the number in your (WWW?-) tag.

Or you modify your script by yourself with some additional code to remove the unwanted part in the script before you write it in your tag.

I tried editing it several times it ether didn't remove or stopped displaying at all.

#WWWAUDIOFILE
outputto "WWWAUDIOFILE"
json_select "uri"
sayrest

What do you do with that to get it to just display #???

I do not use this script and this is just a rough idea that you should test
RegexpReplace "(.*\/release\/\d*)-(.*)" "$1"
Replace sayrest with
SayRegexp "^.*$"

Yes, that works, Thanks!

Hello blackbeen, my first post is a request from lamer :flushed:, so far I have always read the posts and I have always found a solution, but with the latest change by Discogs it is hard for me to make changes. Since you managed to get my beloved Pone scritps working I ask you if you can share so I can see the changes made. With much respect, best regards.

I did not get the Discogs (pone mod) script working I just edited the stock mp3tag Discogs Release ID script to my liking, Discogs (pone mod) seems to be DOA the creator thread has not been active in years.

It's a real shame that it doesn't work anymore, with my customizations I tagged my music files look at the attached photo. Let's hope some good programmer restores it, it's very nice to know who is the composer and the artists who played in the album. This was a precious flower for the Mp3Tag editor.
Have a good evening

Same. For all these years, I was working with Pone Mod to apply tags from Discogs. Is there anyone with the knowledge or skills to review the script and make the necessary changes to make it work again? Maybe Florian himself could use that script and include it in the next Mp3tag update as a standard of Discogs tagging. Seriously, after so many years, so many users used that script and so many users still do. Please revive it again. Just my thoughts aloud: maybe all Discogs info could be applied in the way it is provided by Discogs, but we, users, could adjust what we needed to pull from the server? Like settings and choices to configure the script? PLEASE!

Likewise, I was sad when pone's discogs script stopped working due to the recent changes in discog's api output, which led me to scrap my heavily modified version. I used Florian's discogs.inc as my base (thanks @Florian!) to bring back some of the information I liked to include in my tags. Unfortunately, I'm not too familiar with working JSON arrays (e.g., extraartists), but I think I'm getting a hang of it from looking at Florian's work in parsing the tracklist array. Ultimately, I do not have much time due to work and adopted pone's approach, which involves untangling the JSON formatting for extraartists to scrape the data needed for my preferred credits field.

Here's an example that I tacked on my discogs.inc for Credits and Notes fields (these get merged into the Comment tagfield by a separate custom cleanup action):

# Credits
outputto "CREDITS"
gotoline 1
regexpreplace "(?:^.*\"extraartists\"\:\[)(.*$)" "$1"
ifnot "{\"id"
	say "Credits ▼"
	saynewline
	saynewline
	
	regexpreplace "}$" "\],"
	regexpreplace "\,\"(images|thumb)\"\:.*?\]" ""
	regexpreplace "\,$" ""
	regexpreplace ",\"id\":\d+,\"resource_url\":\".*?\"" ""
	regexpreplace "\]$" ""
	regexpreplace ",({\"name)" "\r\n$1"
	replace ",\"tracks\":\"\"" ""
	replace ",\"anv\":\"\",\"join\":\"\"" ""
	replace "{" ""
	replace "}" ""
	regexpreplace "\r?\n" ""
	regexpreplace "(\"role\":\"[^\"]+\")(\"name\")" "$1<<NEWLINE>>$2"
	regexpreplace "\"name\":\"(.*?)\",\"role\":\"(.*?)\"" "$2 - $1"
	regexpreplace "<<NEWLINE>>" "\r\n"
	regexpreplace " \(\d+\)" ""
	sayrest
endif

# Notes
outputto "NOTES"
gotoline 1
regexpreplace "(?:^.*\")(notes\"\:\".*?)(\"\,\"released_formatted.*$)" "$1"
ifnot "{\"id"
	say "Notes ▼"
	saynewline
	saynewline
	
	replace "notes\":\"" ""
	sayrest
endif

Of course, this is just a beginning, which will need updates as I come across various edge cases.

thank you so much for sharing your code, i will do some tests to adapt it to my scene, give me an example how to write the "Credits" tag on multiple fields

91

best regards

Try this:

# Credits
outputto "ALBUM_CREDITS"
gotoline 1
regexpreplace "(?:^.*\"extraartists\"\:\[)(.*$)" "$1"
ifnot "{\"id"
	regexpreplace "}$" "\],"
	regexpreplace "\,\"(images|thumb)\"\:.*?\]" ""
	regexpreplace "\,$" ""
	regexpreplace ",\"id\":\d+,\"resource_url\":\".*?\"" ""
	regexpreplace "\]$" ""
	regexpreplace ",({\"name)" "\r\n$1"
	replace ",\"tracks\":\"\"" ""
	replace ",\"anv\":\"\",\"join\":\"\"" ""
	replace "{" ""
	replace "}" ""
	regexpreplace "\r?\n" ""
	regexpreplace "(\"role\":\"[^\"]+\")(\"name\")" "$1<<NEWLINE>>$2"
	regexpreplace "\"name\":\"(.*?)\",\"role\":\"(.*?)\"" "$2 - $1"
	regexpreplace "<<NEWLINE>>" "\\\\"
	regexpreplace " \(\d+\)" ""
	sayrest
endif

Instead of the newline split in my code, the above should replace "<<NEWLINE>>" with "\\", the latter being a signpost for splitting the tag into multiple tags. This code is new, as it will need changes if the Credits have specific track information.

Hi, I tested your code:

  1. the TAG is still written on a single field;
  2. the * character is not recognized resists "join" or "env".

Image 2:
I got it by adding to your code
regexpreplace ","id":\d+,"resource_url":".*?"" "£ "
a character £
Then I applied an action like "replace" £ with \\

# Credits
outputto "ALBUM_CREDITS"
gotoline 1
regexpreplace "(?:^.*\"extraartists\"\:\[)(.*$)" "$1"
ifnot "{\"id"
	regexpreplace "}$" "\],"
	regexpreplace "\,\"(images|thumb)\"\:.*?\]" ""
	regexpreplace "\,$" ""
	regexpreplace ",\"id\":\d+,\"resource_url\":\".*?\"" "£ "
	regexpreplace "\]$" ""
	regexpreplace ",({\"name)" "\r\n$1"
	replace ",\"tracks\":\"\"" ""
	replace ",\"anv\":\"\",\"join\":\"\"" ""
	replace "{" ""
	replace "}" ""
	regexpreplace "\r?\n" ""
	regexpreplace "(\"role\":\"[^\"]+\")(\"name\")" "$1<<NEWLINE>>$2"
	regexpreplace "\"name\":\"(.*?)\",\"role\":\"(.*?)\"" "$2 - $1"
	regexpreplace "<<NEWLINE>>" "\r\n"
	regexpreplace " \(\d+\)" ""
	sayrest
endif

It's not very nice but it's what I was waiting for.
Can you integrate this change in the patch?

best regards :smile:

I'm back, your patch in the previous post works very well in combination with an action

Format value
Field: ALBUM_CREDITS
Format string: $meta_sep(album_credits,/)

My change with the |£| character to be trashed :joy: .

I take advantage of your patience if you can give me an input for the COMPOSER field
Thanks in advance

I ran into a use case the other night with anv values and tracks. Fixed it on my end but will put it up here sometime later after I'm back from work.

EDIT:

# Credits
outputto "ALBUM_CREDITS"
gotoline 1
regexpreplace "(?:^.*\],\"extraartists\"\:\[)(.*$)" "$1"
ifnot "{\"id"
	regexpreplace "}$" "\],"
	regexpreplace "\,\"(images|thumb)\"\:.*?\]" ""
	regexpreplace "\,$" ""
	regexpreplace ",\"id\":\d+,\"resource_url\":\".*?\"" ""
	regexpreplace "\]$" ""
	regexpreplace ",({\"name)" "\r\n$1"
	replace ",\"tracks\":\"\"" ""
	regexpreplace ",\"tracks\"\:\"\d+.*?\"" ""
	replace ",\"anv\":\"\",\"join\":\"\"" ""
	regexpreplace ",\"anv\"\:\".*?\"join\"\:\"\"" ""
	replace "{" ""
	replace "}" ""
	regexpreplace "\r?\n" ""
	regexpreplace "(\"role\":\"[^\"]+\")(\"name\")" "$1<<NEWLINE>>$2"
	regexpreplace "\"name\":\"(.*?)\",\"role\":\"(.*?)\"" "$2\: $1"
	replace "<<NEWLINE>>" "|"
	regexpreplace " \(\d+\)" ""
	sayrest
endif

Cleaned up the anv, join, and track entries. You will need to an additional action that split the field by a separator, which is "|" (without quotes here). Replace | with \\ works too.

EDIT 2: Adjusted line 4 to regexpreplace "(?:^.*\],\"extraartists\"\:\[)(.*$)" "$1" to prevent capture of per track extraartists data.

Hi I installed a portable version for these tests, I confirm that it works.
Change in the script:

replace "<<NEWLINE>>" "|"
with
replace "<<NEWLINE>>" "\\\\"

great!

Discogs (pone mod) debugging and making it work again

I was curious to find out, how this web source script works, which user intefaces it offers and what results it delivers. Although I knew that it is in the broken web source category because it is not working any more, I thought I could try to find out why and possibly even fix it.
I was downloading the latest available version (dated on 2020-08-26) I could find from [WS] Discogs (pone mod) - #926 by dano and installing it following the instructions in [WS] Discogs (pone mod), Then I tried the search 'Tag Sources -> Discogs Pone -> Direct by Release ID' and not surprisingly got an empty results screen with an Error indicating message.
After some debugging efforts it soon turned out, that the script was looking for strings like >"title": "<, that have a space character between the colon and the next ampersand. But in the JSON input from the discogs API request to the script the colons are not followed by a space character, instead the strings look like >"title":"<. So after a few more checks I was convinced, that this was a systematically change in the discogs JSON format, that could possibly be fixed by replacing all occurences of the string >\": \"< with >\":\"<
in the discogs pone scripts.
And really, after opening all export-script files in the export directory with the notepad++ editor, replacing the above strings with only one editor command in all open files and regenerating the Tag-Source scripts with the action "Discogs &Pone#Create &Scripts (after editing the settings mp3 file)", these errors are gone.
That does not mean, that all bugs in the discogs pone mod are magically gone,
instead it only means that from some of the scripts I get some reasonable output.

You may try a similar approach to your discogs pone mod script but please make a backup first.

Hi, applying the replacement you posted to my #Pone script, I got a result, I don't get a connection error. Now I see album-cover and TAG Publisher.
The screenshot is better than my translator English.
I attach my #Pone script without your patch

Pone# Direct Discogs ID &1.src (20.3 KB)

The problem in your script lies in line 124, currently it reads:
findinline "\"title":" \""
but it should look like this:
findinline "\"title\":\""
With this fix I get the following result:

When discogs changed, I figured out the removal of the now superfluous spaces from pone's old script, but removing them and ensuring that nothing else broke soon became too tedious for me. Plus, to pone's credit, the script was a bunch of brute force regex's used to untangle the json output from discog's api. While I love using regex's in my code, it is a PITA to debug someone else's implementation at times. Plus, I cannot escape the nagging feeling that a regex-heavy websource script is held together by a bunch of scotch tape.

Anyways, I decided to modify the stock discogs websource and managed to get back the tag fields I was interested in. I gained an understanding of how mp3tag's json parser works and managed to extract the per track data that I was interested in, namely per track composer and remixer information.

Regardless, as with everything else, use what works :wink: