Skip to main content
Topic: JScript Panel (Read 74011 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel

Reply #450
This sounds great news. Just one question then. My scripts currently have the following line at the top;

// @import "%fb2k_component_path%samples\complete\js\lodash.min.js"

Is there a file for the later Lodash library?


Re: JScript Panel

Reply #452
Hi TheQwertiest
Thanks for the info. I've downloaded the .js file and have proved it's being used. Great.

I don't understand your earlier remark .....SetTimeout/SetInterval shims.

Could you point me in the right direction for this please.

Re: JScript Panel

Reply #453
AFAIK most browsers provide SetTimeout, SetInterval, ClearTimeout, ClearInterval methods, which are needed by the latest lodash. JScript can't provide these methods natively (in global namespace), they can be only accessed via window object (e.g. window.SetTimeout).
So for lodash to become fully functional you have to define these methods somewhere in global namespace through window.* methods.

Re: JScript Panel

Reply #454
[deleted]


Re: JScript Panel

Reply #456
v2.1.7 released´╝Ühttps://github.com/marc2k3/foo_jscript_panel/releases

How to add an extra tag to the listenbrainz submission

Reply #457
After reviewing my listens on the listenbrains site, I recognized, that they're "incomplete", because I save remix/version info in the COMMENT Tag, which seems not to be submitted. (also, I did not found any option to tell what should be submitted by the script. Please forgive me, being a old n00b which can't analyze/understand all of your (greatly apreciated!) coding to change it myself without bothering you...)

Maybe you can add Field remappings, like in foo_audioscrobbler ?
The script doesn't use title formatting and I'm not updating it for now.
Hello,
finally, I managed to add my own "feature wish".

If anybody is interested, here is the code. If not, I'll use it as a public note to myself in case updates will overwrite my addition and I'm wondering, why the scrobbles/listens not containing any remix information anymore...  ;-)

How to use it?

Open
Code: [Select]
listenbrainz.js
which is commonly found in
<f2k install dir>\user-components\foo_jscript_panel\samples\complete\js\listenbrainz.js

find the code
Code: [Select]
			var payload = {
track_metadata : {
artist_name : _.first(tags.artist),
release_name : _.first(tags.album),
track_name : _.first(tags.title)
}
};
This is the place where the submitted tags to the listenbrainz server are "generated".

Now add those following lines after the block of code from above. Thats a line after "};"
Code: [Select]
	if (tags.comment) { // fuffi: add comment to tracktitle
var payload = {
track_metadata : {
artist_name : _.first(tags.artist),
release_name : _.first(tags.album),
track_name : _.first(tags.title)+' ('+_.first(tags.comment)+')'
}
};
};  // fuffi
Don't replace any existing code, just add this code, which checks, if a comment-tag exists in the playing track, and if, generate the additional comment-tag after the tracktitle, separated with "(" and ")", which will look like "Artist - Tracktitle (Comment)" or "Tears For Fears - Mad World (World Mix)"

 
SimplePortal 1.0.0 RC1 © 2008-2018