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

Re: JScript Panel

Reply #1400
There is a global limit on images loaded from disk which may prevent the script from displaying all images in a folder (or combination of multple folders). But it works on disk space taken, not image count. Without this limit, the component can gobble up all the memory it can and cause fb2k to crash. I have no idea how to limit memory usage taken in C++ so I get my script to stop loading images when a certain limit is reached.

But the thumbnail mode should have zero affect on that?? It's currently limited to 64MB worth of files which may equate to something like 1GB when loaded in memory. If you use the 64bit version and want to increase this, you can hold Shift+Winkey, right click the panel and select Edit properties. The value of 2K3.THUMBS.SIZE.LIMIT can be increased. It's in bytes. If you wanted to try 128MB, you could enter 134217728.

edit: changelog entry: https://jscript-panel.github.io/docs/changes/#321

Re: JScript Panel

Reply #1401
Thank you.

I increased the value of THUMBS.SIZE.LIMIT and now more images are displayed.
However, in Grid, all of them are displayed, but in Left,Right,Top,Bottom, if there are too many, they are not displayed at all.

Re: JScript Panel

Reply #1402
Oh right, I assume it's the windows API for creating images that is crapping out. There's nothing I can do about it.

If this C++ fails, you get null returned.

Code: [Select]
IJSImage* ImageHelpers::create(uint32_t width, uint32_t height)
{
wil::com_ptr_t<IWICBitmap> bitmap;
if FAILED(g_imaging_factory->CreateBitmap(width, height, GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &bitmap)) return nullptr;
return new ComObject<JSImage>(bitmap);
}

edit: this is the failure message...

Code: [Select]
Arithmetic result exceeded 32 bits.   (0x80070216)

I can probably improve behaviour by making it reduce the number of images used automatically but again this means all content will not be displayed. But it's better to have a valid thumbnail strip than nothing.

 

Re: JScript Panel

Reply #1403
3.3.34

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

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

Thumbs now defaults to resizing the main image to 1024px. It will be left untouched if already smaller. Options exist on the right click menu if you want to restore the previous behaviour of leaving all images untouched.

utils.LoadImage now takes an optional max_size argument which does the above for other people in their scripts. This is opt in. Original images are returned as-is by default. While resizing has always been an option on returned images, this is just more convenient.

Also, plman.GetPlaybackOrders has been added.

Re: JScript Panel

Reply #1404
3.3.35

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

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

This adds utils.RemoveFolderRecursive and $jsp3_since - a title formatting function for showing the difference between a given date string and now. Can be used playback statistics, last.fm last played dates etc.

edit: attached is an example using $jsp3_since(%lfm_last_played%) from Last.fm Playcount Sync




Re: JScript Panel

Reply #1405
3.3.36 is just a minor improvement to the way strings are formatted in $jsp3_since added in 3.3.35.

It now shows years/months and excludes weeks/days for anything over a year.

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

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


Re: JScript Panel

Reply #1407
3.3.38

No component changes except the version bump. This adds date to smooth browser in album mode. There's no room in the "overlayed text" style but is available in all others.

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

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


Re: JScript Panel

Reply #1408
3.3.39 temporarily reverts recent rendering changes.

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

But this is the last version with:
Edge styles for CUI panels
window.CreateThemeManager / IThemeManager interface
CUI toolbars



Re: JScript Panel

Reply #1411
If @eurekagliese or @ApacheReal are feeling brave, here's another attempt at fixing the tab stack switching issue from versions 3.3.30 to 3.3.38 without reverting to my old code.

Note that it will cause errors on any script using window.CreateThemeManager, that is now gone.

Included Smooth samples / JS Playlist that previously made use of it have been updated and should just work.

https://github.com/jscript-panel/jscript-panel.github.io/raw/test/docs/files/foo_jscript_panel3.4.0.fb2k-component

edit: this link is not guaranteed to live for very long


Re: JScript Panel

Reply #1412
The issue appears again on the latest version.


Re: JScript Panel

Reply #1414
Well I did say any script using window.CreateThemeManager would throw an error.

This build has no attempted fixes. It just spams the console so cannot be used with any script using a timer as results will go by too quickly. That certainly rules out the customt track bar or any other seekbar/spinning album art.

Ideally, it should be clean layout with a tab stack and 2 JSP panels. Say artwork in one and properties in the other.

https://github.com/jscript-panel/jscript-panel.github.io/raw/test2/docs/files/foo_jscript_panel3.fb2k-component

I'd like to see the console results.

I understand if people don't have the time to set something like that up. Thanks for your time so far.


Re: JScript Panel

Reply #1416
"no issue" means it's now working? I did push a tiny change after my original post but didn't mention it because I was too late to edit.

As for the logs. I've never seen this in my own testing...

Code: [Select]
RepaintRect() 0.0000000 0.0000000 0.0000000 0.0000000

RepaintRect is only ever triggered by scripts, never by the component itself and since you appear to be using mine, I have no idea how that is happening. That's something else for to me look at.

Re: JScript Panel

Reply #1417
Yes, everything is working properly now.
Regarding the logs, it could be because there was a jsp script tab under tabs.
Here is a preview. (Fortunately, we can utilise scroll to switch tabs).
Spoiler (click to show/hide)
-------
EDIT:
Apparently the problem persists when a song is playing.
Spoiler (click to show/hide)

Re: JScript Panel

Reply #1418
Using the same link, I've added suppression for attempting to paint with invalid width/height values. That's in the component. No one has to update scripts.

https://github.com/jscript-panel/jscript-panel.github.io/raw/test2/docs/files/foo_jscript_panel3.fb2k-component

Meanwhile, it looks like I might need to check out tabs in tabs??

Thanks again for testing.

edit: tabs in tabs is giving me empty RepaintRect even with my suppression in place. That's definitely a bug in my code somewhere.

Re: JScript Panel

Reply #1419
The problem remains when on playback.
Spoiler (click to show/hide)

There's also probably another side quest on that JS Playlist error message.
>Unable to get property 'GetGraphics' of undefined or null reference

Btw, the script is default, only made few minor changes on the title formatting using its panel settings.

Re: JScript Panel

Reply #1420
@eurekagliese

in custom tracks

I have made these changes are they sufficient or do I need to do something else:

Spoiler (click to show/hide)


Re: JScript Panel

Reply #1421
@marc2k3

in JS 3.4.0-dev

I did some tests, the problem returns.

Re: JScript Panel

Reply #1422
@eurekagliese

in custom tracks
I have made these changes are they sufficient or do I need to do something else:
yeah, that's ok.
However during this testing period, it would better to not use it and just use the default one so we can help isolate the issue.

Re: JScript Panel

Reply #1423
@eurekagliese

in custom tracks
I have made these changes are they sufficient or do I need to do something else:
yeah, that's ok.
However during this testing period, it would better to not use it and just use the default one so we can help isolate the issue.

I see continuous activity in the console:


Re: JScript Panel

Reply #1424
I think that on purpose verbose log from marc.
Anyway, my script is super noob, so perhaps it'd be better not use with these dev builds.
Let's just give Marc all the time he needs to figure out the problem. We, or rather I, are not in a rush.