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 314841 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: JScript Panel

Reply #725
https://github.com/marc2k3/foo_jscript_panel/releases

## v2.8.1.1
- Add `IMetadbHandleList` `GetOtherInfo` method. This returns a `JSON` object which is in string form so you need to use `JSON.parse` on the result. This dumps all the information that is viewable on the `Details` tab of the `Properties` dialog. Content is divided in to sections such as `General`, `Location` etc. Other sections like `ReplayGain` and database fields from 3rd party components will be provided here if present.
- The `Track Info + Seekbar` samples have have been tweaked to allow more width for artist/title text. Also, the colour of the stop button automatically changes to reflect `Stop After Current` status. Existing users will need to reload the script from the [Configuration Window](https://github.com/marc2k3/foo_jscript_panel/wiki/Configuration-Window) samples menu.

Re: JScript Panel

Reply #726
https://github.com/marc2k3/foo_jscript_panel/releases

## v2.8.1.2
- Add `properties + other info` sample which makes use of the `GetOtherInfo` method added in `v2.8.1.1`.
- The original `properties` sample no longer displays `ReplayGain` or `Playback Statistics` info. Use the new addition above if you want to display them.

Re: JScript Panel

Reply #727
The most important feature in this component's history is about to be released soon...



Support for coloured fonts and emoji. Just what nobody asked for.

I've also implemented support for styling ranges of text in a single string by passing a JSON array with a start position and length value. Then you can apply different fonts, sizes, bold, styles etc.

Here's a rather stupid example which splits a string by space so every word gets a random style.



It takes just a single line of code inside the on_paint function...

Code: [Select]
function on_paint(gr) {
gr.WriteTextStyled(text, JSON.stringify(styles), 10, 10, window.Width - 20, window.Height - 20);
}

Building the array only takes a dozen lines of code.

Also, scrolling text within the bounds of a given rectangle is now comparatively easy to what was required before.


Re: JScript Panel

Reply #729
spectrogram seekbar.txt:How should I modify the spectrogram that shows the selected track when playback is paused? Also, can this be modified to have scales on the left and right sides, similar to the Spek interface. for easy track comparison.

Re: JScript Panel

Reply #730
Displaying the legend will utterly destroy it's usefulness as a seekbar but you can change this line of code (use 1 instead of 0)

https://github.com/marc2k3/foo_jscript_panel/blob/archive/component/samples/js/seekbar.js#L218

Re: JScript Panel

Reply #731
Thanks.



Re: JScript Panel

Reply #734
Do it is possible to toggle any tab in fullscreen?


Re: JScript Panel

Reply #736
It have a on_focus
do it have a event for when panel gets/loses visibility?
To fire a change withtout click the mouse over the panel.
I would avoid that script work in background it is not need.


Re: JScript Panel

Reply #738
Hi Marc, I've been working on a library filter and I've noticed that when I use EvalWithMetadbs the memory usage goes up on every refresh of the library or panel, but if I use EvalWithMetadb inside a for loop, it does not.

Ram usage goes up on every call of this line:
Code: [Select]
filterEvals = tfo.EvalWithMetadbs(source).toArray();

But not when using for loop:
Code: [Select]
filterEvals = [];
for (var i = 0; i < source.Count; i++) {
var item = source.Item(i);
filterEvals[i] = tfo.EvalWithMetadb(item);
}

Am I doing anything wrong on the first case? For now I'm using the for loop, but the other one runs a bit faster for my use case, I'd like to use it but I can't figure out whats wrong.


Re: JScript Panel

Reply #740
Glad to help!

I ran a few more tests now using my library filter in folder structure mode and the same issue occurs when using GetLibraryRelativePaths, so my guess would be it is related to methods that return a VBArray, maybe?

Thanks for your help.



Re: JScript Panel

Reply #743
That was fast! Looking good so far, I've run the same tests as before and I see no memory issues, at least for the 2 methods I mentioned earlier. Thanks!





Re: JScript Panel

Reply #748
Quote
- Fix a `JS Smooth Playlist` script error when the `Delete` key was used to the remove the last item(s) in a playlist.
I  create an automatic playlist with level 1, and use it to mark songs to be deleted during the usual audition process, and often an error pops up after selecting all the songs in that list to delete. Use the right-click menu, file operations, to delete files.
I have modified the script inside the smp by referring to the place you modified, but I still encounter the error, can you please help me to look inside the smp?

Re: JScript Panel

Reply #749
I was quite specific about the bug I fixed only affected using the Delete key to remove the playlist selection.

Using file operations is something else entirely. Having said that, I did try it just now and I can't make SMP or JSP throw script errors when using it. So I have no idea what you're doing.