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 1341506 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: foo_discogs

Reply #2350
Thanks for the MAIN_RELEASE object. Much appreciated.

However, I'm trying to write $ifequal(%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%,%RELEASE_DATE_RAW%,,%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%) to a tag, but it doesn't recognize equals dates.

This release makes my foobar crash when writing or updating tags: https://www.discogs.com/release/1835548.

Cheers.

Re: foo_discogs

Reply #2351
I observed that RELEASE_DATE_RAW sometimes writes yyyy-00-00 and sometimes just yyyy. This is because that is how the data is entered at discogs. Is it possible to have consistent date notations somehow?

Re: foo_discogs

Reply #2352
a3aan,
Thanks. This bug will be fixed in the next release. Regarding RELEASE_DATE_RAW, yes, that is exactly how it's entered on Discogs. You can get a parsed version (assuming it's able to be parsed properly), from the other release date attributes.

Re: foo_discogs

Reply #2353
Version 2.10 is released:
* Fix crash when formatting string references missing MASTER_RELEASE or MAIN_RELEASE object.

Re: foo_discogs

Reply #2354
Version 2.10 is released:
* Fix crash when formatting string references missing MASTER_RELEASE or MAIN_RELEASE object.
Thanks. Great.

And what about $ifequal(%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%,%RELEASE_DATE_RAW%,,%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%) not recognizing equals dates?

Re: foo_discogs

Reply #2355
Updating or Fetchting this release gives an error:

Quote
(FATAL) Error: Error loading release 505479: JSON Parser ExceptionError parsing release credits.

[ESCAPE to close]
maybe its the ? title on track 2-5 ?

Re: foo_discogs

Reply #2356
And, sorry, I still cannot export/import tag mappings (^^)" Is it only me having such issue?
Import/Export is working here fine, with the old and the newest component.

Here is what you can do to help yourself:

Open the Edit Tag Mappings window.
Copy and Paste *each* line (Tag Name + Formatting String) from that window to a notepad document to have your manual backup.

After you're finished, click the Defaults-Button in the left lower corner of the Edit Tag Mappings window.

Try to Export/Import.

It should work. (If not, you need to delete your configuration manually while f2k is closed. Its located here ...foobar2000\configuration\foo_discogs.dll.cfg)

Now, add or change your backuped lines *one by one* back and for each line, you do an export/import.

Thats -unfortunately- the only way to find out which of your formatting string is broken and causes the errror.

It may be a special (hidden) character or something else.

Unless you (and we) don't know, what causes the problem, zoomorph cannot do anything about it.

It's quite a work, but its worth it. Try it.
And remember: add ony one single line, then try the export/import. if it goes well, contintue :-)


Re: foo_discogs

Reply #2357
Quote
(FATAL) Error: Error loading release 505479: JSON Parser ExceptionError parsing release credits.
[ESCAPE to close]
maybe its the ? title on track 2-5 ?
In the release credits:

Written-By – [...] M. Hollis* (tracks: 1-1, 1-4 to 1-12 to 2-3, 2-8 to 2-16), Hollis* (tracks: 1-2, 1-3, 2-4 to 2-7) [...]

should probably be
Written-By – [...] M. Hollis* (tracks: 1-1 to 1-12, 2-1 to 2-16) [...]

as M. Hollis = Hollis = Mark Hollis

Feel free to edit the Discogs page.

Re: foo_discogs

Reply #2358
Thank you for clarifying PeteG!
For my understanding, there is something wrong with the "to". Some indicator is missing, so the fine component cannot know, what and how to split those track information. (same here in my brain...)

I took a look at the page but as I don't have the original release by my side, I cannot correct something, I do not have a clue about.
Obvious mistakes, spellings or adjustments I can fix, but here, I don't know (also do not understand), what the original submitter wanted to add.

(IF the problem is easy to fix and does not need an original release medium to look at, please take the time and explain it to me maybe in other simple words, as I don't understand, how to fix this correct. If you don't mind.)

Re: foo_discogs

Reply #2359
For my understanding, there is something wrong with the "to". Some indicator is missing, so the fine component cannot know, what and how to split those track information. (same here in my brain...)
The string "1-4 to 1-12 to 2-3" is meaningless. At least for the component (and so it must be!).
It should almost certainly have been "1-4 to 1-12, 2-1 to 2-3". Which probably would eliminate the parse error.

As "Hollis" is Mark Hollis – not the older brother Ed – combining "1-1, 1-4 to 1-12, 2-1 to 2-3, 2-8 to 2-16" (the M. Hollis part) with "1-2, 1-3, 2-4 to 2-7" (the Hollis part) gives "1-1 to 1-12, 2-1 to 2-16".

I do actually own this double cd (it's a gem!), but it's in the attic, and I hesitate to update the Discogs page for the same reason as you (but AllMusic actually do have Mark Hollis as (co)writer on all tracks).

Quote
Obvious mistakes, spellings or adjustments I can fix ...
I follow the same route, more or less. Errors can be annoying sometimes, but I'm full of admiration for all the people spending a lot of time updating Discogs with new (and old) releases.

Re: foo_discogs

Reply #2360
And what about $ifequal(%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%,%RELEASE_DATE_RAW%,,%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%) not recognizing equals dates?
$ifequal() compares integer numbers.
%RELEASE_DATE_RAW% is a string (e.g. 2016-10-28 or 2016-10).
You could argue that when %RELEASE_DATE_RAW% is e.g. 2016 it could be treated as an integer, but that's not the point.


Re: foo_discogs

Reply #2362
Thank you, PeteG!

$ifequal() compares integer numbers.
Thanks. Got it working now. (I have from a dynamically typed background.  ;) )
Could you share with us, how you solved your issue?
Its good, thats its working now, and it would be useful for others too, if we/they not only knew the not working part of your script, but the working part too :-)
Its a learning thing...

Re: foo_discogs

Reply #2363
Could you share with us, how you solved your issue?
Sure. This is what I do now in the tag mappings:
Code: [Select]
DISCOGS_MAIN_RELEASE_DATE <- $if($or($strcmp(%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%,%RELEASE_DATE_RAW%),$strcmp(%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%,$left(%RELEASE_DATE_RAW%,4))),,%MASTER_RELEASE_MAIN_RELEASE_DATE_RAW%)
Code: [Select]
DISCOGS_RELEASE_DATE <- %RELEASE_DATE_RAW%
And I use it in SimPlaylist's Sorting pattern like:
Code: [Select]
$if2(%discogs_main_release_date%,$if2(%discogs_release_date%,$if(%date%,%date%'-00-00','0000-00-00')))+$if2(%discogs_release_date%,$if(%date%,%date%'-00-00','0000-00-00'))+%path_sort%+%tracknumber%
And in SimPlaylist Columns (just a single column) like:
Code: [Select]
[%discogs_catalog%|]
[%discogs_label%|]
[%discogs_country%|]
[Main: %discogs_main_release_date%|]
$if(%discogs_main_release_date%,[This: $if2(%discogs_release_date%,%date%)|],[$if2(%discogs_release_date%,%date%)|])
[%discogs_release_credits%]
I removed some 'compatibility' with previous tagging habits. I hope I didn't mess things up. The sorting has a flaw when the main release date is not like yyyy-mm-dd, but I didn't feel the need to fix that (yet).
If it doesn't explains itself, let me know.

Re: foo_discogs

Reply #2364
Strannik,
"Crash starts with hanging of the app at last page of a artist list (ex. 13/13) and after that Windows suggests me to restart fb2k."
That sounds like the problem fixed in 2.09. Did you try 2.09? If so, are you using custom formatting strings for the "find release" dialog?
Yes, I saw that update, that's why I decided to write because it looked strange. Not sure it was 2.09 (I updated with Help→Check...), maybe server gave me old version if that was possible; shirt time between you uploaded new file, I don't know. But now I have 2.10 — no problem with hanging. So, thanks!

@fuffi,
Yes, there's one way I see in this case. But you know, it's boring to do something manually line by line + check every option write/disable/e.t.c. (: So, if that problem is only on my side, I shall solve it. Thank you for your concern!


Re: foo_discogs

Reply #2366
Is there a way to handle "hidden" Tracks?

In Configuration, on the Caching tab, there's a setting to "Parse hidden tracks as regular tracks".
It can cause confusion when you DON'T have the hidden tracks separated out, and can stuff up track numbering, but it should work in your case.

Re: foo_discogs

Reply #2367
So many thanks! Worked for me, I only had to fix the Track Numbers ...

Re: foo_discogs

Reply #2368
Hi zoomorph,

just a minor thing,
is it possible to add the artists name, just for a little more readable information?



Re: foo_discogs

Reply #2369
Could you share with us, how you solved your issue?
Sure. This is what I do now in the tag mappings:
Thanks a3aan,
I'm trying to have something like that too, but did not figured out yet, how and when I should display informations for main-/master-release-date and/or release-date. I try to steal...erm...learn from others first :-)

Here's what I don't quite understand:
(I try to explain, what I understand, please correct me, if I'm wrong!)
Code: [Select]
[Main: %discogs_main_release_date%|]
$if(%discogs_main_release_date%,[This: $if2(%discogs_release_date%,%date%)|],[$if2(%discogs_release_date%,%date%)|])
first line, you show the %discogs_main_release_date%, if available. ok.
second line, you check, if %discogs_main_release_date%, was displayed. ok.
if yes, you display the %discogs_release_date% for the actual release (and prefix it with 'This'), or, if %discogs_release_date% is not set, you just display the %date% of the actual release. ok.

but if %discogs_main_release_date% is not available, you display the same information, just without the 'This' (via the last $if2)
Why is that?

Re: foo_discogs

Reply #2370

Unfortunately that information is not available from the Discogs API.

As of version 2.07, this can be done manually using the following formatting string:
Code: [Select]
$puts(RATINGS,%<MASTER_RELEASE_RELEASES_DISCOGS_AVG_RATING>%)$puts(VOTES,%<MASTER_RELEASE_RELEASES_DISCOGS_RATING_VOTES>%)$puts(COUNT,$length($get(RATINGS)))$puts(TOTALVOTES,$sum($get(VOTES)))$multi_round($sum($multi_divd($multi_mul($get(RATINGS),$get(VOTES)),$get(TOTALVOTES))),2)
Note that this could be very slow for large master releases, as it requires loading each sub release and then calculating the overall average.

Thank you zoomorph.

I took an introductory class for computer science in university but I couldn't have figured out that formatting string on my own.

Could you also tell me what I would have to replace the %DISCOGS_VOTES% formatting string so that it retrieves the total number of votes from all releases within a master?

Re: foo_discogs

Reply #2371
but if %discogs_main_release_date% is not available, you display the same information, just without the 'This' (via the last $if2)
Why is that?
Not sure I understand you, but the thing is I only like to see the 'This: ' when there is a 'Main: ' and the date for 'This: ' is available. I couldn't get this to work without having much of the same in the then and else parts of that $if().

Re: foo_discogs

Reply #2372
Could you also tell me what I would have to replace the %DISCOGS_VOTES% formatting string so that it retrieves the total number of votes from all releases within a master?
See "TOTALVOTES" within that formula.

Re: foo_discogs

Reply #2373
$puts(VOTES,%<MASTER_RELEASE_RELEASES_DISCOGS_RATING_VOTES>%)$puts(TOTALVOTES,$sum($get(VOTES)))$get(TOTALVOTES)

Thanks for the tip :)

Re: foo_discogs

Reply #2374
Version 2.11 released:
* Fix matching by track numbers erroneously matching multiple files to the same Discogs track. (This was the cause of the bug where tracks from the first CD were used twice.)