Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_discogs (Read 1374036 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_discogs

Reply #2225
Could someone give me a hint for the string for the above?
Can't figure it out I'm afraid ... would be very grateful! =)

You're looking at something like
Code: [Select]
$ifgreater(%RELEASE_TOTALDISCS%,1,"%TRACK_DISC_NUMBER%, %RELEASE_TOTAL_DISCS%",)
for DISCNUMBER
If you want to also delete TOTALDISCS, put in a similar formula for TOTALDISCS but the third parameter would be the desired value *if* there are enough discs.
I haven't actually checked the formula.

Re: foo_discogs

Reply #2226

You're looking at something like
Code: [Select]
$ifgreater(%RELEASE_TOTALDISCS%,1,"%TRACK_DISC_NUMBER%, %RELEASE_TOTAL_DISCS%",)
for DISCNUMBER
If you want to also delete TOTALDISCS, put in a similar formula for TOTALDISCS but the third parameter would be the desired value *if* there are enough discs.
I haven't actually checked the formula.

Hey Frogworth - thanks for the quick reply!
This leads to [INVALID $IFGREATER SYNTAX] .01] ... any idea why?

Re: foo_discogs

Reply #2227
Those double quotes should be single quotes / apostrophes.


Re: foo_discogs

Reply #2229
Those double quotes should be single quotes / apostrophes.

Still gives an error with apostrophes. Without, them, it runs, but still includes the discnumber in the tracknumber, even if there is only 1 disc ...

 

Re: foo_discogs

Reply #2230
Because the correct syntax is:

Code: [Select]
$ifgreater(%RELEASE_TOTALDISCS%,1,'%TRACK_DISC_NUMBER%, %RELEASE_TOTAL_DISCS%',)

Pasted in case your keyboard, code page, or entry system turns apostrophes into "smart quotes".

Re: foo_discogs

Reply #2231
Because the correct syntax is:

Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,'%TRACK_DISC_NUMBER%, %RELEASE_TOTAL_DISCS%',)

Pasted in case your keyboard, code page, or entry system turns apostrophes into "smart quotes".

Thanks a lot kode54!

Now it works great for single disc releases, it's not mentioning the disc number!

However, for example for track 9 on disc 1 of a 2-disc-release, I get this as track number:
%TRACK_DISC_NUMBER%, %RELEASE_TOTAL_DISCS%.09
As I understand it, the objects are now interpreted as text.
Could this be because of the apostrophes?

Re: foo_discogs

Reply #2232
Oh. My bad. I wasn't thinking. What you *really* want is:

Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%TRACK_DISC_NUMBER%',' %RELEASE_TOTAL_DISCS%,)

Sorry about that. Didn't think about the consequences of using quotes causing tags to not be processed.

Re: foo_discogs

Reply #2233
Thanks @kode54 - it was my original mistake and I've been busily searching for the Unicode for commas, not realising you could just stick a quote comma space in there. Nice one :)

Re: foo_discogs

Reply #2234
Re:
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%TRACK_DISC_NUMBER%',' %RELEASE_TOTAL_DISCS%,)
What is
Code: [Select]
%TRACK_DISC_NUMBER%
for a thing? I can't find it in the component help. What is it supposed to mean? As a singular tag it only returns a question mark. Am I missing something?

I would suggest for DISCNUMBER
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%DISC_NUMBER%,)
and for TOTALDISCS
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%RELEASE_TOTAL_DISCS%,)
and maybe for TRACKNUMBER
Code: [Select]
$num(%TRACK_DISC_TRACK_NUMBER%,1)
eliminating  the leading zero ... a matter of personal taste, of course.

Re: foo_discogs

Reply #2235
What is
Code: [Select]
%TRACK_DISC_NUMBER%
for a thing? I can't find it in the component help. What is it supposed to mean? As a singular tag it only returns a question mark. Am I missing something?

Can confirm that - as a single tag, %TRACK_DISC_NUMBER% returns a question mark ...

I would suggest for DISCNUMBER
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%DISC_NUMBER%,)
and for TOTALDISCS
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%RELEASE_TOTAL_DISCS%,)
and maybe for TRACKNUMBER
Code: [Select]
$num(%TRACK_DISC_TRACK_NUMBER%,1)
eliminating  the leading zero ... a matter of personal taste, of course.

Hey PeteG - thanks a lot, this works like a charm! =)
I entered a 0 to get it exactly as it used to be (for example 02.07 for track seven of disc 2).
WOn't work for a ten disc box though ...
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,0%DISC_NUMBER%,)

Now I have one problem left to solve before I can start tagging as I used to:
I miss the compilation checkbox foo discogs used to have.

I would need foo discogs to do the following:
- Check if release has a format description saying "Compilation"
- If yes, add an ALBUM_ARTIST tag saying "Various Artists" (not just "Various") AND add an COMPILATION tag saying "1"
- If no, it should NOT add any tag for ALBUM_ARTIST and COMPILATION at all.

Any hints? =)

I found this solution (which is also described in the examples of the syntax help, but the code is missing there) by zoomorph, but it doesn't work ... this gives me very weird results, namely putting the different artists in the "album artist" position instead of using "Various" and replacing it with "VA" there.

For people who wanted to tag compilations with "Various" as the artist as Discogs always used to, there's no exact solution but here an Album Artist tag string to approximate it:
Code: [Select]
$multi_if($multi_and($any($contains($first(%<<RELEASE_FORMATS_DESCRIPTIONS>>%),$array(Compilation,Mixed))),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2)),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_REAL_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2))),VA,$joinnames($multi_replace(%<RELEASE_ARTISTS_NAME>%,'Various','VA'),%<RELEASE_ARTISTS_JOIN>%))

Re: foo_discogs

Reply #2236
Hey @techsoul, I'm glad I could help.
I entered a 0 to get it exactly as it used to be (for example 02.07 for track seven of disc 2).
WOn't work for a ten disc box though ...
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,0%DISC_NUMBER%,)

First: Title Formatting wiki on formatting numbers.
Then:
For single disc numbers from 1 to 9 in 1-digit format
$num(%DISC_NUMBER%,1) → 1 for the first disc in a set

For multiple disc numbers from 01 to 99 in 2-digit format
$num(%DISC_NUMBER%,2) → 01 for the first disc in a set

For multiple disc numbers from 001 to 999 in 3-digit format (I suppose there are a few classical monster boxes out there with > 100 discs)
$num(%DISC_NUMBER%,3) → 001 for the first disc in a set

Hence you would use something like this
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,$num(%DISC_NUMBER%,2),)
not tested, but give it a try.

Re: The compilation problem
The quoted string consists of 428 alphanumericals ... I understand your question, but right now I'm not in the mood to cut that string into little pieces, and I'm not sure I'd be able to put them nicely back together again. You'll have to wait for one of the true stars. Or maybe there's a different solution?

Re: foo_discogs

Reply #2237
I would need foo discogs to do the following:
- Check if release has a format description saying "Compilation"
- If yes, add an ALBUM_ARTIST tag saying "Various Artists" (not just "Various") AND add an COMPILATION tag saying "1"
- If no, it should NOT add any tag for ALBUM_ARTIST and COMPILATION at all.
Are you sure you want single-artist compilations to be tagged as "Various Artists"?

I found this solution (which is also described in the examples of the syntax help, but the code is missing there) by zoomorph, but it doesn't work ... this gives me very weird results, namely putting the different artists in the "album artist" position instead of using "Various" and replacing it with "VA" there.

For people who wanted to tag compilations with "Various" as the artist as Discogs always used to, there's no exact solution but here an Album Artist tag string to approximate it:
Code: [Select]
$multi_if($multi_and($any($contains($first(%<<RELEASE_FORMATS_DESCRIPTIONS>>%),$array(Compilation,Mixed))),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2)),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_REAL_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2))),VA,$joinnames($multi_replace(%<RELEASE_ARTISTS_NAME>%,'Various','VA'),%<RELEASE_ARTISTS_JOIN>%))
This string attempts a solution like "if there are more than a certain number of unique artists on a release AND it's tagged as a compilation, set 'VA' as the album artist." (You can replace "VA" with "Various" or "Various Artists" as you like.) It's arbitrary and inexact but it's better at not tagging single-artist compilations as 'VA'.

Re: foo_discogs

Reply #2238

First: Title Formatting wiki on formatting numbers.
Then:
For single disc numbers from 1 to 9 in 1-digit format
$num(%DISC_NUMBER%,1) → 1 for the first disc in a set

For multiple disc numbers from 01 to 99 in 2-digit format
$num(%DISC_NUMBER%,2) → 01 for the first disc in a set

For multiple disc numbers from 001 to 999 in 3-digit format (I suppose there are a few classical monster boxes out there with > 100 discs)
$num(%DISC_NUMBER%,3) → 001 for the first disc in a set

Hence you would use something like this
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,$num(%DISC_NUMBER%,2),)
not tested, but give it a try.

Well explained and works perfectly - thanks a lot! I'm starting to see through and learn some stuff at last ... =)


Re: The compilation problem
The quoted string consists of 428 alphanumericals ... I understand your question, but right now I'm not in the mood to cut that string into little pieces, and I'm not sure I'd be able to put them nicely back together again. You'll have to wait for one of the true stars. Or maybe there's a different solution?

No problem, I perfectly understand that ...

Re: foo_discogs

Reply #2239
Are you sure you want single-artist compilations to be tagged as "Various Artists"?

Hey zoomorph - you're right of course, didn't think that far ...

For people who wanted to tag compilations with "Various" as the artist as Discogs always used to, there's no exact solution but here an Album Artist tag string to approximate it:
Code: [Select]
$multi_if($multi_and($any($contains($first(%<<RELEASE_FORMATS_DESCRIPTIONS>>%),$array(Compilation,Mixed))),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2)),$multi_greater($length($unique($flatten(%<<RELEASE_TRACKS_ARTISTS_REAL_NAME>>%))),$div(%RELEASE_TOTAL_TRACKS%,2))),VA,$joinnames($multi_replace(%<RELEASE_ARTISTS_NAME>%,'Various','VA'),%<RELEASE_ARTISTS_JOIN>%))

This string attempts a solution like "if there are more than a certain number of unique artists on a release AND it's tagged as a compilation, set 'VA' as the album artist." (You can replace "VA" with "Various" or "Various Artists" as you like.) It's arbitrary and inexact but it's better at not tagging single-artist compilations as 'VA'.

Don't ask me why, but it works now. Guess I was too tired last night.
Thanks for explaining the code, zoomorph. Helps me a lot to grasp what it is doing.

I had already come up with this last night:
Code: [Select]
$join($multi_replace(%<RELEASE_ARTISTS_NAME>%,'Various','Various Artists'),%<RELEASE_ARTISTS_NAME>%)

It is of course simple and far less flexible compared to zoomorphs code.
But it should work fine for what I need - with one exception:
I also get the "album artist" tag if the artists name is not "Various", but specified.

So I'm looking for something like:
If artists name is "Various", write an "album artist" tag with "Various Artists";
If artists name is anything else than "Various", write no "album artist" tag at all.

Can someone give me a hint on this?

Re: foo_discogs

Reply #2240
@zoomorph,
Just updated to 2.0.4 and my Tag Mappings zeroed. I change back settings and want to save as preset (via Export Save to file), but get an error:
Code: [Select]
(skipped) Error: Error exporting tags: Object not found
[ESCAPE to close]
What file should I choose and what's its extension? Cause in exporting window there is no file extension.
Thanks in advance!  :) 
Unless you're updating from a really old version (1.x), tag mappings should not be zeroed.

The extension you name your file is up to you.
Not sure it was very old, but my last backup shows that *.dll was may's 2016, so… it shouldn't happened, right.
I prefer to use tags without «DISCOGS_%smth%» and keep them in one style. Last update brought nice functionality of checking future tags before writing. foo_discogs is my most used plug-in, it's important feature.
Ok, but anyway I'm unable to save settings due to that error, glad to see any tips!

Oh! Just remembered. One wish: is it possible to make checkbox for making Release Date tag as dd.mm.yyyy or yyyy.mm.dd, or even as is on the site %day month year%, please? Because variant yyyy.dd.mm. always tangles me, never get used to it.

Re: foo_discogs

Reply #2241
hi zoomorph,

a feature request:

Say, I have marked 10 albums which are already tagged by the old component and need to be updated with some new tags.

When updating quite a few albums, its not possible to use the component, until the generatig process* is completed.
*

Is it possible to let the user work with the component ( = using the component along the way on other files/albums) while the generating process it ongoing for other files/albums) ?

This would be a great timesaver because the waiting time sometimes is about 10 minutes for a selection of really big albums, like i.e.  Ninja Tune XX: 20 Years Of Beats & Pieces

Re: foo_discogs

Reply #2242
If i wanted to extend the find release dialog results with the total tracks per release i tried to add %RELEASE_TOTAL_TRACKS% to master sub-release formatting string, but i only get 0 as result. is there any way to fetch the total tracks per release without having to select one release first? :)

Re: foo_discogs

Reply #2243
Trying once again ... need to start tagging tonight.

What would the syntax for
"If %RELEASE ARTIST NAME% is other than "Various", leave the "album artist" tag empty"
look like?

Really tried to figure it out myself, but not getting anywhere ...

Any help is appreciated! =)

Re: foo_discogs

Reply #2244
Is it possible to let the user work with the component ( = using the component along the way on other files/albums) while the generating process it ongoing for other files/albums) ?
Yes it would be possible but it requires some re-architecting because currently foo_discogs uses some shared data structures that would overwrite each other.

Maybe another time. Busy summer here right now.

If i wanted to extend the find release dialog results with the total tracks per release i tried to add %RELEASE_TOTAL_TRACKS% to master sub-release formatting string, but i only get 0 as result. is there any way to fetch the total tracks per release without having to select one release first? :)
Not currently. Note that to fetch this info would require 1 extra API call per release which would be quite expensive in terms of time.

Re: foo_discogs

Reply #2245
If i wanted to extend the find release dialog results with the total tracks per release i tried to add %RELEASE_TOTAL_TRACKS% to master sub-release formatting string, but i only get 0 as result. is there any way to fetch the total tracks per release without having to select one release first? :)
Not currently. Note that to fetch this info would require 1 extra API call per release which would be quite expensive in terms of time.
THX for replying, i thought it could struggle with a second api call, just thought i would ask... ;)

I finally (after more than one year of waiting, following this thread and trying to understand everything) need to start updating my complete collection which i tagged with the old component. i used masstagger with the following code to seperate remix names into their own field (%REMIXED BY%). guess it's possible now with the new string system and trying to figure out the best solution. any hints are welcome! here are the steps i'm using with masstagger right now:

%TITLE% = %TITLE% (%TEMP1%) (%TEMP2%)
%REMIXED BY% = $if2(%temp2%,$left(%temp1%,$sub($len(%temp1%),1)))
%TITLE% = %title%$if(%temp2%, '('%temp1%')')
Remove %TEMP1%
Remove %TEMP2%

it fetches most cases where title has an extension and an additional remix name... :)

Re: foo_discogs

Reply #2246
Hello,
I used to use DISCOGS_TRACK_HEADING for grouping "Bonus Tracks" in tracklist in SimPlaylist.
But I see "?" in 'Preview Tags'.
Release I tried.
Did I do something wrong? (Because I was confused about which tag should I use I tried DISCOGS_INDEX_TRACK_TITLE with no luck also)

Re: foo_discogs

Reply #2247
Hello,
I used to use DISCOGS_TRACK_HEADING for grouping "Bonus Tracks" in tracklist in SimPlaylist.
But I see "?" in 'Preview Tags'.
Release I tried.
Did I do something wrong? (Because I was confused about which tag should I use I tried DISCOGS_INDEX_TRACK_TITLE with no luck also)
It works for me. Did you modify the DISCOGS_TRACK_HEADING tag? Right click on it in the edit tag mappings window and see if "Restore Default" is available.

Can't authorize OAUTH since 2.04 / 06-22-2016

Reply #2248
Hello,

First of all, thank you, thank you, THANK YOU to the developer of the discogs tagger plugin.
This is by far THE one and only most useful piece of software I've ever found for maintaining the ID3 tags in my music collection.

And thank you for keeping it updated. I notice the last few updates seem to be in response to Discogs changing its API. I don't use the discogs tagger every day, and by the time I even notice that the tagger doesnt work. I simply "check for updated components" and the fix is already there. THANK YOU!

That said, it took me till today to need the services of Discogs for tagging something - and I found I needed to update to the 2.04 release from June 22. After updating, I needed re-establish the OAUTH authorization.

I go to Tagging -> Discogs -> Configuration and select the OAuth tab.  I click Authorize. Foobar pops up a window w/progress bar that says: "Processing: Authorizing OAuth..."

But instead of opening my browser, up pops an error dialog (also apparently from within foobar):

"(X) Windows cannot find 'https://www.discogs.com/oauth/authorize?oauth_token=... ...'. Make sure you typed the name correctly, and then try again." [ OK ]

I've tried rebooting, tried changing default browser, changing file associations for HTTP: links etc. Still gives this error. If I run foobar with no browser simultaneously open, and try to Authorize OAuth as above, it goes right to that popup - I do not see an attempt to launch a browser.

My system is a recent reinstall of Windows 8.1 x64 a couple months ago after giving up on Windows 10.

Any suggestions?

Thank you,

saviormoney

Re: foo_discogs

Reply #2249
It's a Windows configuration problem.

If you select "View Release Page" on a tagged file does that work?

Please check your default file associations and make sure the browser is specified for the HTTP protocol. Also for HTTPS.

You can also try this dll which is a long shot but is the only possible problem I could see: https://www.sendspace.com/file/anylx8

Note: If you have OAuth configured in foo_discogs on a different computer/install, you can copy the token and secret into the settings.