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: JScript Panel (Read 285425 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.


Re: JScript Panel

Reply #1002
Thank you! Now it works just fine.


 

Re: JScript Panel

Reply #1004
Anyone using smooth browser should make sure that update to fb2k v2 Beta 13 and component version 3.1.14 released yesterday. Previously I had to add a hacky workaround to prevent refreshing on playback statistics updates but that only worked for playcount updates. Now there is proper code which suppresses refresh on all playback statistics updates and updates from any other components that utilise DB functionality from the SDK.

This is documented here for anyone writing their own scripts...

https://marc2k3.github.io/jscript-panel/docs/callbacks/#on_library_items_changedhandle_list-fromhook

Re: JScript Panel

Reply #1005
Message for Marc2K3:

Sorry if the translation is not well understood.I am Spanish and use Google Translator

I have installed the version V-2_64-bit + columns IU 2.0.0 ALPHA. 5. Most commements have not been able to install them as there is no 64 -bit version.

That is why I have installed JScript Panel 3 to replace the foo_uie_albumart component 0.2.7.1 by albumart.js

And I have the following problem:

Albumart.js paints the cover defined in preferences \ advanced \ display \ album art \ -> in my case "Prefer embedded" (image1)

I would like albumart.js to give the possibility of choosing to paint the external or embedded cover.

As seen in the image2 (Foobar 32 bit) the album art paints the external and the playlist view paints the embedded (image2).

Is this possible? If it was not possible, I would like the code linen to indicate where the cover load is produced to modify it in .js that corresponding.

Re: JScript Panel

Reply #1006
The sample you mention has always respected the main preferences and won't be changed. It's explained in great detail here...

https://marc2k3.github.io/jscript-panel/gallery/album-art/

If you want to ignore the Preferences, you need to write your own script that doesn't use the album art methods and uses the generic utils.LoadImage function based on whatever path/title formatting you like.


Re: JScript Panel

Reply #1008
Hi :)
JScript Panel 3 3.1.15 (2022-11-25)
Font, Color of Text Dispaly has become strange
https://i.imgur.com/fDWDETk.png

Preference > Columns UI > Colours and fonts > Item details > Font: Yu Gothic UI
Text Display > Custom text

[%title%$crlf()]
$font(Yu Gothic UI,16,600,2,0,0)$rgb(220,40,0)
[%artist%$crlf()]
$font()$rgb()
[%album%$crlf()]
[ '('%date%')'$crlf()]
[Track Number: %tracknumber%][ / %totaltracks%]$crlf()

JScript Panel 3 3.1.14
https://i.imgur.com/ypNnAIU.png

Thanks
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HIFIMAN ANANDA, HIFIMAN Arya, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, FiiO FT5, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: JScript Panel

Reply #1009
Sorry. I fixed it by replacing the component several times.
It's strange.  :o
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HIFIMAN ANANDA, HIFIMAN Arya, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, FiiO FT5, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: JScript Panel

Reply #1010
Preference > Columns UI > Colours and fonts > Item details > Font: Yu Gothic UI

This has zero effect. The default font name when using CUI comes from Common (list items). The font weight / size from there are ignored. The weight will always be default (400) and the default size usually comes from the right click menu on text/list based panels.

If you want to override it for your whole text display panel, you need to use $font at the start and never use $font() - always revert to the original $font statement after styling a custom bit of text/new line.

Re: JScript Panel

Reply #1011
> Preference > Columns UI > Colours and fonts > Item details > Font: Yu Gothic UI
I wrote something irrelevant. orz

Thank you for your clear explanation.

Thanks again for your help.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HIFIMAN ANANDA, HIFIMAN Arya, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, FiiO FT5, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: JScript Panel

Reply #1012
I've updated my github links.

docs are now here: https://jscript-panel.github.io/docs/
releases are now here: https://github.com/jscript-panel/release/releases

The old links will live on for a few hours before I nuke them!  :o

Re: JScript Panel

Reply #1013
Message for marc2K3:

I need help.

I am modifying the script "Track Info + Seekbar + Buttons".

And I can't write in JavaScript the first line of the following code:

if (%genre% == 'Clásica') {
    var tfo = fb.TitleFormat('%album%   %date%   %artist%^^"$upper(%composer%)"  %tracknumber%. %title%^^[%playback_time%]^^$if2(%length%,LIVE)');
} else {
    var tfo = fb.TitleFormat('%artist%   %date%   %album%^^%tracknumber%. %title%^^[%playback_time%]^^$if2(%length%,LIVE)');
}
What I need is simply that in the case of a classical genre track it paints some metadata and otherwise others.

-------------------------------------------------------

I installed "fontawesome-webfont.ttf".
The buttons are painted correctly but when I move the mouse pointer to the buttons I get JavaScript error (image)

Thank you very much for your help

Re: JScript Panel

Reply #1014
1) use $strcmp and incorporate in the TF string like this...

Code: [Select]
var tfo = fb.TitleFormat('%album%   %date%   %artist%^^$if($strcmp(%genre%,Clásica),$upper(%composer%),)  %tracknumber%. %title%^^[%playback_time%]^^$if2(%length%,LIVE)');

2) That is not my original code. You've made a terrible edit so you should undo it or just re-install the component to restore the untouched files.


Re: JScript Panel

Reply #1016
I already set the background colour to white/dark grey depending on dark mode. This can be tested by adding a panel, removing all code and then switching DUI/CUI dark mode preferences. It will update in real time as you do it.

Any white showing through on startup will be most likely caused by a script blocking the main thread before it can be rendered. That's the nature of the beast with these javascript-y components. It could be other components blocking the main thread but that's less likely.

edit: if using the thumbs script and you have the thumbnail strip enabled, turn it off. That can be expensive depending on number/size of images. Displaying/cycling through images without the strip on display is cheap and should not affect startup.

late edit: while poking around a bit more, I did discover some dodgy code of mine that will display the javascript error text/red background even when there are no errors It only seemed to happen with a time consuming script running in CUI. I'll try and fix that.

Re: JScript Panel

Reply #1017
3.1.16 for fb2k 2.0 Beta13+

https://github.com/jscript-panel/release/releases

The last version compatible with fb2k 1.6.6-1.6.14 has been shunted off to my v1 component graveyard.

https://github.com/marc2k3/fb2k-archive/releases

I'm willing to fix bugs if people report them but it won't be getting new features.


Re: JScript Panel

Reply #1019
Sounds great Marc !!! thank you.
I'll test it end of week when i'm back home and i successfully manage to upgrade to V2.


Re: JScript Panel

Reply #1021
Thanks, marc2k3!

Re: JScript Panel

Reply #1022
1) use $strcmp and incorporate in the TF string like this...

Code: [Select]
var tfo = fb.TitleFormat('%album%   %date%   %artist%^^$if($strcmp(%genre%,Clásica),$upper(%composer%),)  %tracknumber%. %title%^^[%playback_time%]^^$if2(%length%,LIVE)');

2) That is not my original code. You've made a terrible edit so you should undo it or just re-install the component to restore the untouched files.


I want to thank you for your great help. You saved my life.

Thanks to your Indes my code was like this:

Code: [Select]
var tfo = fb.TitleFormat('$if($strcmp($cut(%genre%,7),Clásica),%album%   %date%   %artist%^^"$upper(%composer%)"  ,%artist%   %date%   %album%^^)%tracknumber%. %title%^^[%playback_time%]^^$if2(%length%,LIVE)');

I also solved the matter of the buttons by installing version 3.1.17

Now I have the following problem:

   - How can I write above and below Seekbar? (Image1)

If it is not to abuse much I would like the Album Art, when I select an artist from the Album List Panel and deposit its albumes in the playlist "Library view" the Panel shows instead of an empty image the cover corresponding to the first album of the playlist. (This is what Artwork View does)

I would also like to know if you have thought of programming a script to replace the obsolete Graphical Browser component and thus be able to complete my foobar 64-bit.

Thank you for reading this message and for keeping jscript_panel3.
Thanks to your component I am gradually building my 64-bit foobar version.

Re: JScript Panel

Reply #1023
Regarding the text, you just need to modify the WriteText function in your script. You've already changed the y value to move text up/down so you just need to change the w value to make it expand wider.

The album art panel has always tracked playlist selection and not any library viewer. It's documented here under Limitations

https://jscript-panel.github.io/gallery/album-art/#limitations

Smooth Browser has a grid like album art view but is bound to the Library. There is no playlist option which I think graphical browser was tied to.

https://jscript-panel.github.io/gallery/smooth-browser/

Re: JScript Panel

Reply #1024
Regarding the text, you just need to modify the WriteText function in your script. You've already changed the y value to move text up/down so you just need to change the w value to make it expand wider.

The album art panel has always tracked playlist selection and not any library viewer. It's documented here under Limitations

https://jscript-panel.github.io/gallery/album-art/#limitations

Smooth Browser has a grid like album art view but is bound to the Library. There is no playlist option which I think graphical browser was tied to.

https://jscript-panel.github.io/gallery/smooth-browser/


Thanks again for your help. I could already leave the texts as I wanted.

Indeed the Graphical Browser is linked to the playlist. I already installed Smooth Browser but it did not help me to be linked to the library.