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 script discussion/help (Read 300874 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: JScript Panel script discussion/help

Reply #1126
Unfortunately, this doesn't change the fact that the correct kbps value is only displayed after about 1 second.
This is the value set in Preferences/Advanced/Properties dialog/VBR bitrate updates per second.
If it says "0", then the VBR values ​​do not change. But the correct values are displayed without delay.

I inserted the added code in the main panel script and also in the Text Display Script for testing.

But maybe I'm doing something wrong?

Re: JScript Panel script discussion/help

Reply #1127
 I'm using standard fb2k SDK methods like any other component. Whatever string is returned from the various title format methods are completely untouched by me. I really don't see how I can do anything about it.


Re: JScript Panel script discussion/help

Reply #1129
Recently the developer of https://github.com/saschanaz/jxl-winthumb released a 32-bit version of the wic plugin for the jxl codec. And I again return to my old desire to store a cache of spectrogram images in jxl format. This plugin works, but in foobar2000 the entire jxl image on the panel is covered with a white translucent color, in other programs there is no such behavior, the file itself is of normal color, which means the problem is how the jscript panel processes wic. Find and fix this issue please.

Re: JScript Panel script discussion/help

Reply #1130
Attach the jxl file as embedded art to an audio track. See if fb2k 2.0+ or Columns UI artwork panels display it correctly. I can't test because I don't have admin rights for registering DLLs right now.


Re: JScript Panel script discussion/help

Reply #1131
Since I have no idea about the above issue I posted and shared my code in an old jxlthumb issue that mentioned fb2k here...

https://github.com/saschanaz/jxl-winthumb/issues/22#issuecomment-1805551035

edit: so my code isn't at fault. Something in jxlthumb needs fixing.

Re: JScript Panel script discussion/help

Reply #1132
@marc2k3 :
I recently updated to the latest version (i was lagging behind a few versions) and for some reasons my rating in JS Playlist are grey instead of the previous version in which they were golden.
Maybe i missed a step or i didnt find the option to change the color. Would you happen to know why ?
thanks
Grey : X

Golden : X

Re: JScript Panel script discussion/help

Reply #1133
This is a side effect of the dynamic colour support that was added. It defaults to the text colour because that makes sure it's always readable regardless of background colour.

But if you don't use dynamic colours, I guess I should restore the old behaviour or make it customisable. I'll have a fix in the next release.

Re: JScript Panel script discussion/help

Reply #1134
@etip , if you can't wait for the next release, these files should fix your issue. Save inside the component folder/samples/jsplaylist

https://raw.githubusercontent.com/jscript-panel/component/main/samples/jsplaylist/main.js
https://raw.githubusercontent.com/jscript-panel/component/main/samples/jsplaylist/playlist.js

Re: JScript Panel script discussion/help

Reply #1135
yep, it works, Thanks !

Re: JScript Panel script discussion/help

Reply #1136
In regard to JS Playlist:
Is there anything I can do on my end to eliminate displaying the information indicated by the red arrows in the two graphics?


Edit: Maybe I am posting in the wrong subforum?

Re: JScript Panel script discussion/help

Reply #1137
Forget the above request. I figured out a way! :)

Edit: ...But it does leave a section of empty vertical space.

Re: JScript Panel script discussion/help

Reply #1138
Is there an auto size function for the contents of a panel?

When I reduce the display of the panel, in the thumbs and album art samples I see an adaptation, while in the text display and texer reader samples, the text does not adapt to the reduction of the panel.


 

Re: JScript Panel script discussion/help

Reply #1140
Change the row height to 1.

Anything below a setting of 3 in the row height loses the track count and total duration display. (At least on this PC it does)

Anyway, I think it is fine the way it is set up now.

Re: JScript Panel script discussion/help

Reply #1141
Hello, sorry for budging in... I was just wondering if is it possible to write values to a Song's Details tab? I want to implement my version of foo_playcount as it's not customisable...

Especially the Played field and the Last played field, in foo_playcount their tags are %play_count% and %last_played% respectively.

I've attached an image to show what I exactly meant...

Re: JScript Panel script discussion/help

Reply #1142
I've been modding the samples\Status Bar.txt file, and I have it working pretty well. I've come upon a couple issues though.

First, I added items in the context menu for changing the font and fontsize via InputBoxes. After getting the new value, I found that refresh() and window.Repaint() don't suffice, and I've gone with window.Reload(). This works, but after it does, a standard context menu for a default panel shows of its own accord. Is there a way to suppress that?

Second, I'm getting results I don't expect from utils.CalcTextWidth(). I've taken to multiplying the result by a fudge factor that looks pretty close to 96 pixels / 72 points. Does the function return a value in points?

Re: JScript Panel script discussion/help

Reply #1143
Ah, so I found the step I omitted after changing the font/fontsize and before trying to refresh: I hadn't actually rerun CreateFontString. :-[ Still, the appearing context menu on Reload was weird.

And the CalcTextWidth bit is clear to me now. Give it points, get points back. Want pixels? Give it pixels.

Re: JScript Panel script discussion/help

Reply #1144
Hello, sorry for budging in... I was just wondering if is it possible to write values to a Song's Details tab? I want to implement my version of foo_playcount as it's not customisable...

Especially the Played field and the Last played field, in foo_playcount their tags are %play_count% and %last_played% respectively.

I've attached an image to show what I exactly meant...

Found an extension called External Tagger which can tag files and send them to a SQLite DB or APE tags, not sure if it's possible to integrate it with this. There's m-Tags as well but haven't been having a lot of success so far...

Re: JScript Panel script discussion/help

Reply #1145
Playback statistics were built in to JSP2 (and SMP inherited them) but it was removed in JSP3. I'm working on bringing them back. It's basically done, I just haven't written the docs. That's a hateful job.

You retrieve values with standard title formatting and setting values is done via various handle methods like

Code: [Select]
handle.SetPlaycount(25);

Integration with the properties dialog is all done automatically. Here's an old screenshot as an example:



The one major flaw in previous implementations is that the title formatting was hard coded to %artist% - %title%. All I cared about was storing last.fm stats which worked well for me but it was probably less useful for everyone else. The new version is entirely configurable. But any changes to the title format will wipe all previous data. It has to be used with care!

Re: JScript Panel script discussion/help

Reply #1146
That's a hateful job.
Speaking as a retired technical writer, I'll freely review and or edit any Foobar2000 developer's documentation, if that will ever help.

Quis custodiet ipsos custodes?  ;~)

Re: JScript Panel script discussion/help

Reply #1147
@Azuriye - see the latest release page/docs

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

@2tec - thanks for the offer. Not sure you'd want to check all the content on my docs site though.

https://jscript-panel.github.io/docs/

It's quite a lot and goes way beyond the average fb2k component. :P

help

Reply #1148
This is the script I modified from samples. Now I want to make the slider display at the start position of the seekbar and display "0:00" on both sides of the seekbar after the playback stops

Re: JScript Panel script discussion/help

Reply #1149
@Azuriye - see the latest release page/docs

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

@2tec - thanks for the offer. Not sure you'd want to check all the content on my docs site though.

https://jscript-panel.github.io/docs/

It's quite a lot and goes way beyond the average fb2k component. :P

Hello! Thanks a lot for implementing this feature, have a small doubt about whether the Playback Statistics (foo_playcount) plugin is needed or if can I remove it now and implement everything with the JScript Panel. Also is it possible to have a context menu to hook it with my foobar toolbar buttons? I've attached images below to explain...