Skip to main content
Topic: foo_discogs (Read 830442 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

 

Re: foo_discogs

Reply #2676
Hello zoomorph,

woud it be possble to enhance the Release ID / URL filter to get all releases from a master release link ? (Its always a great'n'fast pleasure to just paste a link from the discogs websites, even if the fine component is still loading the trillions of releases via the api..)

Given, the user pastes a master-link, say, https://www.discogs.com/master/11392 or https://www.discogs.com/The-Beatles-A-Hard-Days-Night/master/24003
your fine component would show only those releases, related to their master release.

I think, both, the discogs-servers and the users will benefit from this addition, because we do not need to load all releases (speed ups) and then can easily chose from a master-list which release we want to tag our tracks.

Now, when the user inputs a master-release-link, nothing useful is done ;->

Re: foo_discogs

Reply #2677
I'm not sure, I understood what you're trying to accomplish, but I read zoomorph stated $pput and $pget, but you trying to use $put and $get instead? I never have worked with those, so I cannot tell if one might be of better use.
True.
Looks like I grabbed $put & $get from:
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#
which does not list $pput or $pget as available at all.

My main problem is understanding caching discogs API/server data to be used for other fields within foobars' scritpting/formatting syntax, and/or, constructing multiple nested IFs.
Oh how I wish there was python in foobar/foo_discogs...
c.
What you're asking about should be pretty simple. The "featuring" value is already calculated in DISCOGS_CREDIT_FEATURING. Use $pput() to save that to a variable, make sure that tag formatting string is higher than TITLE in the list, and then use $pget() to retrieve it in the TITLE string.

You can find info on $pput() and $pget() in the foo_discogs HTML help page which is accessible by clicking "syntax help" on the edit tag mappings dialog. These functions persist across all tags for a file whereas builtin $put() and $get() only persist across a single tag formatting string.

Re: foo_discogs

Reply #2678
Another Bug was found
It's a big one IMHO, I only had it a few times the last year(s), but now I could reproduce it.
Please see the attached animated GIF.
Filtering bug. Will be fixed next release. :-)

Another Bug was found
It's a big one IMHO, I only had it a few times the last year(s), but now I could reproduce it.
Please see the attached animated GIF.
Another bug found (maybe the same origin)

This bug is similar to reproduce.
Please see the attached Screenshots to see the differens "before" -> "after" (check the "UK" in the Releases list)

search for "Andy Ash", filter "White Leaf".
Open the release, via Next-Button and then go back via Back-Button.
Click again on "Andy Ash", in the results list, or type something in the filter-window, or just click the Search-Button.
"UK" now shows up.

Strangely I can't reproduce this one. Note that sometimes country is or is not included in the format field coming from the Discogs API (but it shouldn't change like that).

Hello zoomorph,

I just remember you have this issue tracker https://bitbucket.org/zoomorph/foo_discogs/issues?status=new&status=open

Would it be better to post bugs/feature requests here in the thread or in the tracker on bitbucket ?
Posting in this thread is fine.

Hello zoomorph,

woud it be possble to enhance the Release ID / URL filter to get all releases from a master release link ? (Its always a great'n'fast pleasure to just paste a link from the discogs websites, even if the fine component is still loading the trillions of releases via the api..)

Given, the user pastes a master-link, say, https://www.discogs.com/master/11392 or https://www.discogs.com/The-Beatles-A-Hard-Days-Night/master/24003
your fine component would show only those releases, related to their master release.

I think, both, the discogs-servers and the users will benefit from this addition, because we do not need to load all releases (speed ups) and then can easily chose from a master-list which release we want to tag our tracks.

Now, when the user inputs a master-release-link, nothing useful is done ;->
Interesting suggestion although I think it would have limited value. If you are already on Discogs master page, why not just find the correct release ID while you're there? You could add it to the issue tracker if you want me to think about it more and consider it if/when I get time to add more features.

Re: foo_discogs

Reply #2679
What you're asking about should be pretty simple. The "featuring" value is already calculated in DISCOGS_CREDIT_FEATURING. Use $pput() to save that to a variable, make sure that tag formatting string is higher than TITLE in the list, and then use $pget() to retrieve it in the TITLE string.

You can find info on $pput() and $pget() in the foo_discogs HTML help page which is accessible by clicking "syntax help" on the edit tag mappings dialog. These functions persist across all tags for a file whereas builtin $put() and $get() only persist across a single tag formatting string.

Sweet, that sort of makes sense. Thanks!
Next difficulty - I see no way to re-order the 'Edit Tags Mappings' list to make sure that:
DISCOGS_CREDIT_FEATURING
as well as
DISCOGS_CREDIT_REMIXED_BY
appear before
TITLE
and could be cached into a pput variable, to be used with pget on the TITLE formatting...?
Is there a trick to this ?
I tried exporting as well (to no .ext, as well as .txt, .csv & .xml) but nothing seems to give me anything I would have control over the field order, seemingly. csv in UTF-8 did show some ascii, but the fields/separation was all busted. No success with any of the others, which were just binary and did not give a hint as to what .ext these exported mapping files are meant to be...?
Mind you, I'm on an old foo_discogs... 2.14 from the looks, in case some sort of re-ordering functionality came in later versions.

Cheers.
c.

Re: foo_discogs

Reply #2680
So, instead of re-ordering, I gave it a try to double up on field declarations...

So this, in the following order (at the end / after all other foo_discogs mappings) does at least cache the values seemingly, but would create artifical tag fields to hold the variable, which seemingly then also have to be written to file, as there's only 'Write', 'Update' and 'Disable', whereas the later not only disables the field write, but also the query / variable declaration... :/

On top of which, these issues I'm seeing & battlign with foo/foo_discogs syntax,,,:
TEMP_Discogs_feat
=
$pput(feat,$flatten($multi_if($any($multi_strcmp($sextend(%<<TRACK_CREDITS_SHORT_ROLES>>%,%<<RELEASE_CREDITS_SHORT_ROLES>>%),'Featuring')),$multi_if($put(aj,$sextend(%<<TRACK_CREDITS_ARTISTS_JOIN>>%,%<<RELEASE_CREDITS_ARTISTS_JOIN>>%)),$joinnames($put(an,$sextend(%<<TRACK_CREDITS_ARTISTS_NAME>>%,%<<RELEASE_CREDITS_ARTISTS_NAME>>%)),$get(aj)),$get(an)),)))

TEMP_Discogs_rmx
=
$pput(rmx,$flatten($multi_if($any($multi_strcmp($sextend(%<<TRACK_CREDITS_SHORT_ROLES>>%,%<<RELEASE_CREDITS_SHORT_ROLES>>%),'Remix')),$multi_if($put(aj,$sextend(%<<TRACK_CREDITS_ARTISTS_JOIN>>%,%<<RELEASE_CREDITS_ARTISTS_JOIN>>%)),$joinnames($put(an,$sextend(%<<TRACK_CREDITS_ARTISTS_NAME>>%,%<<RELEASE_CREDITS_ARTISTS_NAME>>%)),$get(aj)),$get(an)),)))

Which creates the variable and fills it appropriately, but also would be written as a custom field, which I would not want....
And thirdly, the re-injection into TITLE... just to test IF this would work, IF I were to write the fields to be able to cache the variable... which is where it gets error-y...

TITLE
=
$if($pget(feat),%TRACK_TITLE%' (Ft. '$pget(feat)')',%TRACK_TITLE%))
=
"(FATAL) Error: Error generating tag TITLE [Corrupted array string: missing start byte] for file file://D:\bla\bla.flac"

or

TITLE
=
$if(%$pget(feat)%,%TRACK_TITLE%' (Ft. '%$pget(feat)%')',%TRACK_TITLE%))
=
Is just re-injecting TITLE into TITLE as it was, as %$pget(feat)% seems to be considered not available/ None when it reaches this... despite displaying it properly in its' own %TEMP_Discogs_feat% field just above...


Any ideas / suggestions would be muchly welcome.
Churs.
c.

Re: foo_discogs

Reply #2681
Version 2.19:
- Fix $filter() function not removing empty strings from array.
- Fix $pput() and $pget() to operate per track as expected, rather than per release.
- Fix filtering on expanding master release on find release dialog.

Re: foo_discogs

Reply #2682
alec.tron,

There's no way to reorder the tag list but you can delete a tag and add it at the bottom.

If you want to clear a "temp" tag, you can define the same tag again later on with an empty tag formatting string. That will delete it.

I accomplished what you were asking for with the following tag formatting strings:

TEMP=$pput(feat,$filter($flatten($multi_if($any($multi_strcmp($sextend(%<<TRACK_CREDITS_SHORT_ROLES>>%,%<<RELEASE_CREDITS_SHORT_ROLES>>%),'Featuring')),$multi_if($put(aj,$sextend(%<<TRACK_CREDITS_ARTISTS_JOIN>>%,%<<RELEASE_CREDITS_ARTISTS_JOIN>>%)),$joinnames($put(an,$sextend(%<<TRACK_CREDITS_ARTISTS_NAME>>%,%<<RELEASE_CREDITS_ARTISTS_NAME>>%)),$get(aj)),$get(an)),)),))

and

TITLE=%TRACK_TITLE%$if($any($pget(feat)),' (Ft. '$join($pget(feat))')',)

I encountered a couple bugs on the way which were fixed in 2.19!

Re: foo_discogs

Reply #2683
Awesome, thanks for fixing those bugs which I wouldn't have ever be able to identify as such, and updating to 2.19 !!!
Following your examples, I was able to get the compound version of the above working as well. So as this took me a bit of poking around again, so for anyone who wants/needs something like this, i.e to combine Featuring & Remix credits into the title of a track in one go - you need to add these to the Mapping Dialogue as new fields at the end:

Tag Name
Formatting String


TEMP_feat
$pput(feat,$filter($flatten($multi_if($any($multi_strcmp($sextend(%<<TRACK_CREDITS_SHORT_ROLES>>%,%<<RELEASE_CREDITS_SHORT_ROLES>>%),'Featuring')),$multi_if($put(aj,$sextend(%<<TRACK_CREDITS_ARTISTS_JOIN>>%,%<<RELEASE_CREDITS_ARTISTS_JOIN>>%)),$joinnames($put(an,$sextend(%<<TRACK_CREDITS_ARTISTS_NAME>>%,%<<RELEASE_CREDITS_ARTISTS_NAME>>%)),$get(aj)),$get(an)),)),))


TEMP_rmx
$pput(rmx,$filter($flatten($multi_if($any($multi_strcmp($sextend(%<<TRACK_CREDITS_SHORT_ROLES>>%,%<<RELEASE_CREDITS_SHORT_ROLES>>%),'Remix')),$multi_if($put(aj,$sextend(%<<TRACK_CREDITS_ARTISTS_JOIN>>%,%<<RELEASE_CREDITS_ARTISTS_JOIN>>%)),$joinnames($put(an,$sextend(%<<TRACK_CREDITS_ARTISTS_NAME>>%,%<<RELEASE_CREDITS_ARTISTS_NAME>>%)),$get(aj)),$get(an)),)),))


TITLE
%TRACK_TITLE%$if($any($pget(feat)),' (Ft. '$join($pget(feat))')',)$if($any($pget(rmx)),' ( '$join($pget(rmx))' Remix)',)


TEMP_feat


TEMP_rmx


Whereas as explained by zoomorph above, the last 2 need to be 'empty' in order not to write the temp variable into an actual tag field.
Thanks a ton @zoomorph !
c.

Re: foo_discogs

Reply #2684
Yup. And you don't actually need any temp tags, you could just put it all in one tag, unless you find it too unwieldy.

Re: foo_discogs

Reply #2685
I used to work with older versions with no problem.
Latest 2.18 and 2.19 though, doesn't allow me to authorize. The OAuth process hangs and then I get "Error: Network exceptionNetwork authentication error (80090302)".




Re: foo_discogs

Reply #2686
I used to work with older versions with no problem.
Latest 2.18 and 2.19 though, doesn't allow me to authorize. The OAuth process hangs and then I get "Error: Network exceptionNetwork authentication error (80090302)".
1. Your system clock must be set correctly for OAuth authentication to work.
2. As of mid-2018, Discogs requires TLS 1.2 support to access its API.

Re: foo_discogs

Reply #2687
1. Your system clock must be set correctly for OAuth authentication to work.
2. As of mid-2018, Discogs requires TLS 1.2 support to access its API.
Thanks. TLS was my problem. Once enabled, it works.

Re: foo_discogs

Reply #2688
Could anyone please help me with a problem I have?…

I love this plugin and I've used it to tag quite a few CDs now. But what I really want to do is rip and tag my entire CD collection (including over 1,000 double CD compilations). The trouble is that the plugin takes time to download the release lists for each CD, so it just isn't possible to process so many CDs. It would require me to spend about a solid month working 8-hour days just sitting and waiting for release lists to download!

Does anyone know any way that I could batch process my CDs quickly? This would be possible if the plugin was able to:

1. Batch download the release lists of multiple albums, ready so that tagging can be done later.
2. Send all artwork downloads to a queue in the background.

Re: foo_discogs

Reply #2689
Version 2.19:
- Fix filtering on expanding master release on find release dialog.

Hello,
there now is a new smallish, but inconvenient bug, which came with this update.
It mostly finds attention, when the list of releases is very long, for example, take the beatles or m. jackson.

Wenn you expand a master release (say, at the bottom of the list of releases), the focus/cursor/pointer jumps back to the first entry in the list. So the user needs to scroll all the way down to that expanded master release. Which is, if you want to expand multiple master-releases, a bit annoying.

On the other hand, this bug is very handy too, because if you want to expand ALL master releases, you just need to hold the cursor down key for 10 minutes and the fine component will open all the master releases. One after each other from the top to the bottom of the list.

(I wish, there were a button: Expand all master-releases)

Re: foo_discogs

Reply #2690
Another bug found (maybe the same origin)

This bug is similar to reproduce.
Please see the attached Screenshots to see the differens "before" -> "after" (check the "UK" in the Releases list)

search for "Andy Ash", filter "White Leaf".
Open the release, via Next-Button and then go back via Back-Button.
Click again on "Andy Ash", in the results list, or type something in the filter-window, or just click the Search-Button.
"UK" now shows up.

Strangely I can't reproduce this one. Note that sometimes country is or is not included in the format field coming from the Discogs API (but it shouldn't change like that).
I re-tested it against Version 2.19 and it is reproducable. Please see the attached and (poorly) animated GIF.
Maybe it helps to reproduce it yourself. Just click/type around, *after* you came back from the Match Tracks window.
You then will see the UK, which is not there from the beginning.
And, of course, you need to restart f2k or reset your cache.

Re: foo_discogs

Reply #2691
Hello zoomorph,

woud it be possble to enhance the Release ID / URL filter to get all releases from a master release link ? (Its always a great'n'fast pleasure to just paste a link from the discogs websites, even if the fine component is still loading the trillions of releases via the api..)

Given, the user pastes a master-link, say, https://www.discogs.com/master/11392 or https://www.discogs.com/The-Beatles-A-Hard-Days-Night/master/24003
your fine component would show only those releases, related to their master release.

I think, both, the discogs-servers and the users will benefit from this addition, because we do not need to load all releases (speed ups) and then can easily chose from a master-list which release we want to tag our tracks.

Now, when the user inputs a master-release-link, nothing useful is done ;->
Interesting suggestion although I think it would have limited value. If you are already on Discogs master page, why not just find the correct release ID while you're there? You could add it to the issue tracker if you want me to think about it more and consider it if/when I get time to add more features.
The value of this new feature is exactly the reason you don't mention in your example ;-)
Speed!  :)
I prefer "comparing" releases <->my files inside the fine component. Its just faster to check, if the filenames/tracklenghts/trackcounts /etc matches or not. It saves time and time is a worthy value, if you trying to tag a lot of music, like I do. (You added a preview-page, which is not available on the discogs-website, so checking tracks inside the fine component is so much more userfriendly and convenient.)


Btw, while we are about links (and convenience aka lazyness or inattentiveness), would you mind to let the fine component strip/remove the "?ev=rr" from a link, pasted into the "Release ID / URL" field?

i.e. https://www.discogs.com/Esquivel-Space-Age-Bachelor-Pad-Music/release/396870?ev=rr

Now, an error occours.
Code: [Select]
(FATAL) Error: Error loading release rr: Page Deleted or Missing (404)(url: https://api.discogs.com/releases/rr)

[ESCAPE to close]

Those ?ev=rr are coming from a recommanded album, please see the screenshot:


Re: foo_discogs

Reply #2692
Hi all

Apologies if these questions have already been answered, I would like some help with the following 2 questions please.

1) Is there a way of setting the script up so that it wont tag "Disc Number" and "Total Discs" if the Total number of discs is only 1? The reason I ask is that at the moment it's adding those 2 tags for single disc CD releases, and on my foobar skin its adding "Disc 1" at the end of the entry in my playlist (Artist - Title - Record Label - Cat # - Disc#

I only want it to add those tags if the number of discs is greater than 1

2) Is there a way of stopping the script adding a duplicated record label tag? For example, some discogs releases have 2 variations of the cat number, so it appears as, for example, "Diverse System, Diverse System - DVSP-100; DVSP 100" (it's a made up example of what I've seen). I would like to be able to only have the record label appear the once, with the 2 cat number variations appearing after it still

Hope both of these are achievable :)

Thanks again for this brilliant component!

Re: foo_discogs

Reply #2693
1) Is there a way of setting the script up so that it wont tag "Disc Number" and "Total Discs" if the Total number of discs is only 1? The reason I ask is that at the moment it's adding those 2 tags for single disc CD releases, and on my foobar skin its adding "Disc 1" at the end of the entry in my playlist (Artist - Title - Record Label - Cat # - Disc#

You can do this. You could do it in your skin's configuration, but I agree that it's annoying having redundant 1/1 for those values!
Go to Edit tag mappings, which you can get to from various parts of the Discogs tagger dialog.
For DISCNUMBER, put:
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%DISC_NUMBER%,)
And for TOTALDISCS put:
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%RELEASE_TOTAL_DISCS%,)

Second one looks like something that @zoomorph might need to look into.

Re: foo_discogs

Reply #2694
1) Is there a way of setting the script up so that it wont tag "Disc Number" and "Total Discs" if the Total number of discs is only 1? The reason I ask is that at the moment it's adding those 2 tags for single disc CD releases, and on my foobar skin its adding "Disc 1" at the end of the entry in my playlist (Artist - Title - Record Label - Cat # - Disc#

You can do this. You could do it in your skin's configuration, but I agree that it's annoying having redundant 1/1 for those values!
Go to Edit tag mappings, which you can get to from various parts of the Discogs tagger dialog.
For DISCNUMBER, put:
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%DISC_NUMBER%,)
And for TOTALDISCS put:
Code: [Select]
$ifgreater(%RELEASE_TOTAL_DISCS%,1,%RELEASE_TOTAL_DISCS%,)

Second one looks like something that @zoomorph might need to look into.

Thanks very much, will give this a go now :)

Re: foo_discogs

Reply #2695
Does anyone know any way that I could batch process my CDs quickly? This would be possible if the plugin was able to:

1. Batch download the release lists of multiple albums, ready so that tagging can be done later.
2. Send all artwork downloads to a queue in the background.
There are no options for batch processing (until you've already tagged them once, then you can use the Update Tags feature). foo_discogs could be slow for artists/releases with a lot of releases/versions as the Discogs API applies rate-limiting. Still, compared with the time it takes to rip CDs tagging should be quick.

2) Is there a way of stopping the script adding a duplicated record label tag? For example, some discogs releases have 2 variations of the cat number, so it appears as, for example, "Diverse System, Diverse System - DVSP-100; DVSP 100" (it's a made up example of what I've seen). I would like to be able to only have the record label appear the once, with the 2 cat number variations appearing after it still
Use the $unique() function for the labels tag, such as:

$unique(%<RELEASE_LABELS_NAME>%)

Re: foo_discogs

Reply #2696
Does anyone know any way that I could batch process my CDs quickly? This would be possible if the plugin was able to:

1. Batch download the release lists of multiple albums, ready so that tagging can be done later.
2. Send all artwork downloads to a queue in the background.
There are no options for batch processing (until you've already tagged them once, then you can use the Update Tags feature). foo_discogs could be slow for artists/releases with a lot of releases/versions as the Discogs API applies rate-limiting. Still, compared with the time it takes to rip CDs tagging should be quick.

2) Is there a way of stopping the script adding a duplicated record label tag? For example, some discogs releases have 2 variations of the cat number, so it appears as, for example, "Diverse System, Diverse System - DVSP-100; DVSP 100" (it's a made up example of what I've seen). I would like to be able to only have the record label appear the once, with the 2 cat number variations appearing after it still
Use the $unique() function for the labels tag, such as:

$unique(%<RELEASE_LABELS_NAME>%)

Excellent, works great, thanks guys!

Re: foo_discogs

Reply #2697
Not quite sure what's happening but the clear cache function doesnt seem to be clearing the cache. I tried using the script on a release which is multi-disc and had the wrong numbering format, so the script didnt properly detect it as a multi-disc release. I updated the entry on discogs to the correct numbering format (1-1 etc), I then tried tagging again and it's still detecting the old information even though the website has been updated. I tried pressing the 4 clear cache buttons in the caching tab on the script, then restarted foobar, and tried doing the tags again on the same release, but no change.

Hope you can help

Re: foo_discogs

Reply #2698
Not quite sure what's happening but the clear cache function doesnt seem to be clearing the cache. I tried using the script on a release which is multi-disc and had the wrong numbering format, so the script didnt properly detect it as a multi-disc release. I updated the entry on discogs to the correct numbering format (1-1 etc), I then tried tagging again and it's still detecting the old information even though the website has been updated. I tried pressing the 4 clear cache buttons in the caching tab on the script, then restarted foobar, and tried doing the tags again on the same release, but no change.

Hope you can help
The Discogs API caches the only info and sometimes it takes a few hours for the API to start returning the new info.

Re: foo_discogs

Reply #2699
Not quite sure what's happening but the clear cache function doesnt seem to be clearing the cache. I tried using the script on a release which is multi-disc and had the wrong numbering format, so the script didnt properly detect it as a multi-disc release. I updated the entry on discogs to the correct numbering format (1-1 etc), I then tried tagging again and it's still detecting the old information even though the website has been updated. I tried pressing the 4 clear cache buttons in the caching tab on the script, then restarted foobar, and tried doing the tags again on the same release, but no change.

Hope you can help
The Discogs API caches the only info and sometimes it takes a few hours for the API to start returning the new info.

Hiya

Thanks for the fast response. I'm guessing they made changes to their API as I remember old versions of the plugin had a button to clear cache and it was pretty instantaneous when recognising updates to the database.

I meant to ask before, is their a way of making the plugin detect multi-disc releases using the wrong numbering format?

for example:-

multi-disc releases using 1-1, 1-2, 2-1, 2-2, etc, obviously work fine with the plugin, as the numbering format is as per guidelines

However, for example, releases with 1.01, 1.02, 2.01, 2.02, etc, are not recognised as multi-disc releases and are instead counted as 1 through to 40 tracks (if there were 20 tracks on CD1 and 20 tracks on CD2, for example)

Thanks again for the plugin, it's such a godsend!

 
SimplePortal 1.0.0 RC1 © 2008-2019