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

Re: JScript Panel

Reply #1450
JS Playlist, when single clicked in the standard Filter,
The standard Artwork view is not displayed. If you double-click, it will be displayed.

If you single click in the JS Playlist panel, the Artwork view selected in the standard Filter is displayed.
-----------------------------
  ↓
Single click on 'A' in the standard Filter → The standard Artwork view is not displayed.
(Double-click 'A' in the standard Filter → the standard Artwork view shows 'A'.)

Single click on 'A' in the standard Filter → standard Artwork view shows nothing.
Single click on 'B' in the JS Playlist panel → standard Artwork view shows 'A'.

foobar2000 v2.12
JScript Panel 3 v3.4.2

 

Re: JScript Panel

Reply #1451
Any interaction between what you're calling a "standard filter (??)" and any artwork panel is nothing to do with ANY playlist.

A playlist viewer only updates other panels like artwork or selection properties when it's clicked.

I've attached a gif showing how it does exactly the same thing as the DUI playlist view. If you want to point out its shortcomings, please do so in relation to other playlist viewers.

Re: JScript Panel

Reply #1452
Any interaction between what you're calling a "standard filter (??)" and any artwork panel is nothing to do with ANY playlist.

A playlist viewer only updates other panels like artwork or selection properties when it's clicked.

I've attached a gif showing how it does exactly the same thing as the DUI playlist view. If you want to point out its shortcomings, please do so in relation to other playlist viewers.

Without the JS Playlist, both the standard Filter and Artwork View work fine.
Introducing the JS Playlist will affect the standard Filter and single clicks will work incorrectly.

Re: JScript Panel

Reply #1453
Again with the "standard filter" of which I have no clue. That's why I added ?? in my post. If that's CUI filters then say so. That's very much not "standard".

edit: some testing has revealed some naughty behaviour in this component. It will probably need breaking changes for those who write their own playlist views/library viewers. I'll try and keep the changes as minimal as I can.

Re: JScript Panel

Reply #1454
More breaking changes in a minor release ahoy.  ;D

3.4.3 fixes some selection holder bugs where once set, it wasn't released for other selection viewers to take over. This has no affect on sample users. Just update the component and everything should be fine.

Script writers maintaining playlist/library viewer scripts will need to make changes like these that were made to JSPlaylist/smooth samples etc.

https://github.com/jscript-panel/component/commit/f4d4175d39f33da15450db8080bfd77118fa86a6

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

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

Re: JScript Panel

Reply #1455
Regarding the single click in JS Playlist, it worked correctly in V3.4.3.
Thank you very much.

And, as a minor detail, the JS Playlist
group header line, the total time is followed by a '.' (dot) in the group header line.
The total time of the playlist is not followed by a '.' (dot) is not displayed after the total time in the playlist.

This is not a particular problem, but I noticed it and am reporting it.


Re: JScript Panel

Reply #1457
3.4.4 is a pretty minor release.

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

A few sample fixes and $jsp3_since has been updated with proper today/yesterday handling. It never returns 0d any more so any previous title formatting gymnastics are no longer necessary.

Re: JScript Panel

Reply #1458
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.

Thumbs,before,when 'thumbs.size.limit' was 67108864 (64MB), it showed up to 219 images, and when I set it to 134217728 (128MB), it showed more.

Now, even with 75px,134217728(128MB), it is down to 110 images.

Number of pictures does not change even if the folder to be displayed is changed, so it may be that the number of pictures is limited by the number of pictures rather than the size ?

JScript Panel 3 Version 3.4.4

Re: JScript Panel

Reply #1459
Yeah, I put more restrictions in. While it's nice to have a dozen or 2 images on rotation, I think getting in to the hundreds is silly and way beyond what this was ever meant for. Edit the script yourself if you want to change it.

https://github.com/jscript-panel/component/blob/8fb1bdde45a742de574db6fc132b8686f3334559/samples/js/thumbs.js#L140-L150

Just be warned that this can exhaust all memory and cause fb2k to crash. I mean proper crashes, not script errors.

Re: JScript Panel

Reply #1460
Hey marc2k3, sorry to bug you with this one, :)

Can you please have a look over the "Menu Button" sample / code? I've been using it since around v3.3.14 and getting some strange glitches with wrong menus appearing, just updated to current v3.4.4 and same deal. For example "glitch-1" screenshot of 'File > Load playlist...' showing the 'Playback' menu.

At first I thought it was because I modified the script incorrectly - just minor stuff like changing the bright red background :D , but now reset to default sample (as the bright red indicates), and then tried on fresh install of foobar v2.1.2 and same deal.

At second I thought it was another component interfering - perhaps something like foo_flowin, because on the fresh install, the only component installed was JSP3, and yet one time I got a foo_flowin sub-menu appear - how can that be? At that time I had a second foobar instance running my main install with foo_flowin loaded there. Then I closed everything and nuked the DLL from orbit, yet still the same deal on the fresh install - see "glitch-2" screen showing a menu that does not even exist in foobar. (?!)

It only happens occasionally though, I probably had to click the button 15 times to get that (and then clicking outside the menu to close it). It usually is just a sub-menu appearing on what should be a single-click command.

Hopefully you have some ideas what the heck is going on here?  :-[ (I'm on Win10 v22H2 b19045.4046, by the way, and fb2k 32-bit)

Re: JScript Panel

Reply #1461
That is very curious. I've never seen anything like it.  :o

Can I ask about the potential number of dynamic menu items you might have? I'm thinking DSP chains/playlists/etc. Is there anything slightly unusual about your setup?

Re: JScript Panel

Reply #1462
Hello marc,

I'm trying to add a "glass" overlay to album covers but .png with alpha channel and shadows seems not supported very well.
foobar2000 on the left, paint.net on the right:



I'm using utils.LoadImage to load the file and gr.DrawImage to draw it. Is it normal ?

JScript v3.3.37 & Windows 10

Re: JScript Panel

Reply #1463
Can confirm this menu problem. In fact I have it for quite some time now, not only since the last updates (Win11 fbk2 32 bit).

The wrong submenus seem to come from my German Windows version.


Re: JScript Panel

Reply #1464
I'm trying to add a "glass" overlay to album covers but .png with alpha channel and shadows seems not supported very well.
foobar2000 on the left, paint.net on the right:

Attach the image inside a zip please.

Re: JScript Panel

Reply #1465
About 3 DSPs and 55 playlists. I suppose a bit experimental though, I moved all library navigation into 10 foo_flowin pop-ups along the top (there are actually 16 in the 'View > Flowin' menu, some not used leftover from previous fb2k v1 install - though this was a fresh install of v2, not upgraded, but I did copy over foo_flowin.dll.cfg file)

Occasionally the menu also glitches with a missing top level, like File, or View.

But like I said, I can reproduce on a fresh install and just now did so with no other foobars / programs running. I think it does glitch more often on my main install with more components and sub-menus to choose from.

Component list (foo_flowin has wrong version info, pretty sure is actually current v0.2.1) -

Spoiler (click to show/hide)

EDIT: ^ Major_Tom with the German menus. Thanks for confirming. At least now I know it was nothing I've done.

Re: JScript Panel

Reply #1466
I've knocked up a special debug build where the menu is no longer functional. The menu items will appear in the same way but clicking them will never execute any commands because I want it to be safe regardless of what the menu item says. Instead, they will log some info to the Console. I'd like that output please. Particularly if the top level name given did not match what you actually clicked.

This is 32bit only since both of you are using 32bit.

Re: JScript Panel

Reply #1467
One example where i had the complete View-Menu behind Playback - Stop shown and I selected DSP - Equalizer:
MainMenuManager::ExecuteByID: view 37

Another one for the same constellation where I selected console:
MainMenuManager::ExecuteByID: view 44

No console logs available for German language submenus

some more:

MainMenuManager::ExecuteByID: view 11 (Oscilloscope selected from Menu behind View - Internetradio)

MainMenuManager::ExecuteByID: view 10 (View - Visualizations - Spectrum Analyzer - Equalizer)

Next try, the View menu was gone completely

MainMenuManager::ExecuteByID: playback 44 (View - Visualizations - Spectrum Analyzer - Playback - Stop)


Re: JScript Panel

Reply #1469
foobar2000 v2.1.2 x86 [portable]
Playlist #0 loaded in 0:00.000374
JScript Panel 3.4.4 (Menu Button by marc2003): initialised in 88 ms
User Interface initialized in: 0:00.294131
FFmpeg version: 6.0
Startup time : 0:00.404086
Library initialized after 0:00.404179
MainMenuManager::ExecuteByID: file 16
MainMenuManager::ExecuteByID: edit 22
MainMenuManager::ExecuteByID: view 1

^ This was Edit > Remove duplicates > (top level sub menu) View > Always on top.

MainMenuManager::ExecuteByID: playback 16

^ View > Always on top > (Devices menu) Null output - (I think)

MainMenuManager::ExecuteByID: view 6

^ View > Activate or hide > (Vis menu) Oscilloscope

MainMenuManager::ExecuteByID: playback 7

^ File > Add folder > (Order menu) Random

MainMenuManager::ExecuteByID: playback 37

^ View > Always on top > (Order menu) Random

MainMenuManager::ExecuteByID: playback 28

^ Edit > Select all > (top level) Playback > Pause

They all seem to match the last menu clicked rather than first menu selected.

(I can try more thoroughly tomorrow, past my bedtime now...)


Re: JScript Panel

Reply #1471
I have another build for debugging this menu issue.

This restores the menu function to what is was before. For some more Console output I need to see, paste this in any panel and click OK.

Code: [Select]
fb.RunMainMenuCommand("plop"); //plop can be anything that doesn't exist

This gives a total count. As an example, mine goes up to 150. I'd like to see if peeps with problems have a lot more.

Re: JScript Panel

Reply #1472
Here you are:

Spoiler (click to show/hide)

Whatever you changed, I can't reproduce the strange behaviour with this debug version - switching back to the regular version, the wrong menus are back again


Re: JScript Panel

Reply #1474
Thanks a lot  :)