Skip to main content
Topic: foo_discogs (Read 817775 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.

 
SimplePortal 1.0.0 RC1 © 2008-2019