[WS] Discogs (pone mod)

I hope it's just you. At least it is working fine for me.
Discogs has sometimes temporary downtimes. So please always check first if discogs is available in your browser.
You do not need to update the settings mp3 from 3.2 to 3.3. An update of the settings mp3 file is only necessary if I introduce new options. To keep things simple for the users I just wrote to update the settings mp3 file with every script update. Should be no problem, the update does not change any settings you have made.

@downunder:
Nice. But I'm affraid you will have to change this manually with every script update. I don't know if I can make an option for different searches, since this would need an extra export script. Did you replace an existing script or did you make a new one? Can you post your script? So maybe I can make an option for that.

@stevehero:
I'm still thinking for a way to deal with portable installations. The easiest thing would be to change the export action like you did. But that would be mean, that every user has to store the settings mp3 file in the Mp3tag folder. Would not be that bad, but I was happy with my sollution to be able to store the settings mp3 file wherever you want.
At the moment, the script checks your Mp3tag version with the placeholder %_app%. Can you tell me if there is any possiblity for Mp3tag to check if you are using a portable installation?

@KrissO:
Changing the filename is not possible with web sources. Writing something to _FILENAME with a web sources script results in a tag field named _FILENAME instead of the actual filename.

@stevehero & KrissO:
In the next update there will be a possibility to freely combine different fields in one field like:
album = album [catalog #]
comment = publisher / catalog #
Update will be coming in this week.

No it is not working.
I surly check always Discogs because I only use Discogs-ID to search for the release with the Script.

But I get an error with the script (3.2a or 3.3) now.

All Fields are blank, except:

ALBUM:
ALBUMARTIST: combined field of Albumartist and Album with Non-Printing Characters (eg: Station Rose – Dave Remixed)
DISCOGS_RELEASE_ID: correct
DISCOGS_RELEASE_URL: correct

I think there is a parsing error.
Maybe Discogs did some changes on their website again.

That's the error version 3.2 showed after discogs did the latest changes.
Maybe you updated not only the settings mp3 file and not the scripts? The update scripts action ist called "Create Scripts ...", maybe that is a bit confusing. You have to create scripts with every update.

You can check the status of your scripts in the settings mp3 file. It should show the following tags:
TITLE: discogs Pone Mod, scripts updated to v.3.3
ARTIST: discogs Pone Mod, setting mp3 file updated to v.3.3

Wow, great news!! :slight_smile: :slight_smile:

I think for portable users the "Discogs Pone Web Script Settings.mp3" file is perfectly placed in the Mp3tag folder. In fact even any version it probably is the best solution. I have my mp3tags favourite folder pointed at the mp3tag folder so every time I load mp3tag the "Discogs Pone Web Script Settings.mp3" loads up, so I can make any changes. Thats just MY work-flow, others may differ. :slight_smile:

But I think if you bundle the attachment I gave in THIS post then that will solve the problem. And maybe name it "Discogs &Pone#Create &Scripts for Portable Versions (after editing the settings mp3 file).mta" BTW, am I right in saying that this will very rarely need to be updated anyway seeing as the scripts will follow the same naming convention?!

To answer your last Q. I'm not sure if it can check whether or not its a portable Version. Sorry.

Brilliant, Thanks Pone

I agree and I also have the mp3tag folder as Favorite Directory and my settings file is also in that directory. But as you say, other peoples workflow may differ, and that's what the whole options are about. Making the scripts useable for everyone's workflow.

The next version will have an simple yes/no option for portable installations.

You are almost right about the need for updates of that mta file. The exports would also work without an update of that file.
But it is updated with every version for the new scripts version information for the TITLE field of the settings file.
And it is included in every update for new users of the script. As I try to keep installation simple, it's better if users don't have to care what files are only for the first installation and what files are for updates. It's complicated enough with the settings mp3 file.

You were right.
I clearly did s.th. wrong while updating the mp3.

Now it works fine.

Other questions:

I would like to tweak your scripts a little bit for me.

I want that the track output is always two digits. $num(%track%,2)
But I am not able to put it in the right section of the scripts.

And I want _LENGTH also written to %length%

How can I do this?

TRACK can't be changed. I is built into Mp3tag's web sources structure. You need a action to change this afterwards.
However, while experimenting with my script, I stumbled across something which I belive is a bug of Mp3tag:
/t/11831/1
You can experiment with it. Let me know if you get a stable solution to change TRACK.

Are you sure you want to write the discogs lenth into you mp3 file? Every mediaplayer can show you the actual length of your files. What is the worth of having a second length form discogs which will be a few seconds shorter or longer in most cases?
I could make a option for that. I just thought it would be nonsense.
EDIT:
I just see it's already possible with my DISCOGS~PONE COPY ... options.
Set the following options:
DISCOGS~PONE COPY 1 SOURCE: _length
DISCOGS~PONE COPY 1 TARGET: length
and export the scripts again (action: Discogs Pone#Create Scripts...)

I have a action for this, but I hoped I can put this to the script so I can reduce as much work as possible after tagging. Right now it is four steps: Tagging -> Saving again for multi value fields -> Actions -> Renaming mp3s

This would not be the only action I would like to put to the script. I just need a hint and started with %track%. If it is not possible through MP3Tag then I have to stick with the actions.

I think you misunderstood me.
I do not want the Discogs lenght written, since it not always stated.

_LENGTH is read from MP3Tag directly from the file. And this value I want to have writtehn to %length%.

Non-Sense or not, I want it :rolleyes:

Update 3.4:

Fixed: Releases without a Country displayed a single space instead of nothing for the Country field. This is fixed now.

Fixed: The "Tracklist for DJ Sets in one file" script did not overwrite artist and title with albumartist and album in version 3.3. This is fixed now.

New: OPTION: DO YOU USE MP3TAG AS PORTABLE VERSION?
Default is "no". Set this to "yes" if you use Mp3tag as portable version to prevent that the new scripts are created in the %appdata%\mp3tag.

New:
TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR STANDARD SCRIPTS
TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR MULTISONG-TRACKS TRACKLIST SCRIPT
TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR DJ SETS IN ONE FILE TRACKLIST SCRIPT

This requires a bit of knowledge of Mp3tag's web sources script language. The option adds any any code you want at the end of the script. By this, you can freely combine fields and additional text. Gives you lots of oportunities.
I have made two extra options for the special tracklist scripts. As these parse discogs in a different way, it will be necessary to add ad different code there in cases where you combine fields which are different for every track of a release. E.g. if you want to combine Album & Chapter.

Two examples how to use this option, based on the suggestions here in the thread:
stevehero wants to write album as album [catalog #]:

outputto "album"
say " ["
sayoutput "catalog #"
say "]"

KrissO wants to write comment as publisher / catalog #

outputto "comment"
sayoutput "publisher"
say " / "
sayoutput "catalog #"

Be carefull with multivalue-tags for publisher and catalog # for these examples here. May result in unwanted results. You could avoid this be not writing multivalue-tags. Or you parse for publisher and catalog # againg in the free text option code instead of repeating the old output with the sayoutput command.
You see, this is an advanced option, you should have some knowledge of Mp3tag's web sources script language before you use it. If not, keep it to the default "#" which is ignored by the web sources script language. Do not write simply "no" in these option fields, that will leed to non working scripts

So you want something from the technical file information ( %_length% ) to be written into a tag field ( wich you want to name %lenth% ).
That has nothing to do with web sources. Web sources can read file information only for the search at the begin, they can't use them for writing it to other fields again.
Your action:
Action: Format Value
Field: LENGTH
Formatstring: %_length%

Absolutley nonsense. But do as you want.

:slight_smile: your the man, BTW I think the default option for portable version is 'yes' instead of 'no'

Can't is a word I really don't like. So I put my brains to work and based upon your script an I think dano's I made a new script. I used the API as much as possible and formatted the TRACK field to 99/99. So YES it seems to be possible. Since this is the first time I spent some time making a script there will be flaws. I uploaded my script and suggest you improve and incorporate it in your script. Keep up the good work.

discogs__Pone__Search_by_Artist_Album___Copie.src (11.2 KB)

Your script writes only one track. Tracklisting doesn't work, right?
TRACK and TITLE have only a special function and formating, if more than one track is written.
Can you rewrite the TRACK field for more than one track?

If i understand correctly what you mean with tracklisting, tracklisting works and yes you can write more than one track field. I attached a printscreen. There are still some issues with my script like it doesn't handle vynil numbering to well (a1,a2 etc.) and if the albumartist is unknown it doesn't automaticly selects artist.


Oh, great! Your screenshot looks good.
But I can't reproduce it. Have you uploaded the latest version of you script? I only get the first track.
Most probably because I get for artist.

Solved the artist problem was a typo albumartist where it should have been artist in the if2 statement.Attachment 3862 not found.

discogs__Pone__Search_by_Artist_Album___Copie.src (11.4 KB)

It get's the correct artist now, but still only the first track.
All releases I tried are shown as if they had only one track. I also tried http://www.discogs.com/release/968220 from your Screenshot. Gives me only one track.

OK it works for me so I'm trying to find the differnce. I downloaded my upload and found it still had the api key. So I removed the script uploaded my copy without the API key. After replacing the XXXXXXX in the scriptfile with my API key it works for me. Have you used your Discogs API key? And if so what does the debug file give for info? If possible can you sent it so I can look at it and try to troubleshoot? It will be tommorow :slight_smile:

I used it with my own API, but that should make no difference. I will do some experiments with your script. Maybe I can get it going. If not, I will send you the debug. I will also report what chages got it going, if I get it going.

EDIT:
OK, it works. But only if I have the exact number of files as in the disogs release. I tested with only one file before.
That is a different behaviour as wiht the standard scripts which write TRACKS instead of TRACK and TITLE. Normally TRACKS gives the number of tracks to write, and you can see if your mp3 album misses some tracks.
With your script the number of files gives the number of tracks to write. So you don't see if the last tracks are missing, and you get strange results if you have more tracks than the discogs release. But at least you can see the number of total tracks. If you have less files than the discogs release has tracks, you still see the other tracks in the debug file, but not in the "Adjust tlbum information" window.

I will do further experiments with that new knowledge. Maybe we can get it going.