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

Re: JScript Panel

Reply #550
v2.5.6 https://github.com/marc2k3/foo_jscript_panel/releases

- Fix crash with `utils.GetAlbumArtAsync` when it's asked to query art from radio streams. Update docs to clarify only `IMetadbHandle` `GetAlbumArt` and `utils.GetAlbumArtV2` can retrieve that type of art.
- Fix `track info + seekbar + buttons` sample to properly update on stream title/art changes. Note this requires replacing the text in any existing panel by using the `Samples` menu.

Re: JScript Panel

Reply #551
v2.6.0-Beta.1 https://github.com/marc2k3/foo_jscript_panel/releases

- Add `fb.AddLocationsAsync`. Similar to `plman.AddLocations` except rather than specifiying a target playlist, you get the processed handles to a new `on_locations_added` callback.
- Add `plman.AddPlaylistLock` / `plman.RemovePlaylistLock`. Use in conjunction with the existing `plman.IsPlaylistLocked`, `plman.GetPlaylistLockFilterMask` and `plman.GetPlaylistLockName` methods. The `on_playlists_changed` callback will be triggered when locks are added/removed. See docs for full details.

Re: JScript Panel

Reply #552
v2.6.0-Beta.2 https://github.com/marc2k3/foo_jscript_panel/releases

- Add `fb.AddLocationsAsync`. Similar to `plman.AddLocations` except rather than specifiying a target playlist, you get the processed handles to a new `on_locations_added` callback.
- Add `plman.AddPlaylistLock` / `plman.RemovePlaylistLock`. Use in conjunction with the existing `plman.IsPlaylistLocked`, `plman.GetPlaylistLockFilterMask` and `plman.GetPlaylistLockName` methods. The `on_playlists_changed` callback will be triggered when locks are added/removed. See docs for full details.
- (Beta.2) Add `plman.ShowPlaylistLockUI`. This only works if the playlist is unlocked or the lock is owned by `JScript Panel`. Provides a popup dialog with checkboxes for toggling the various options on/off.

Beta.2 adds a Playlist Lock dialog similar to the one provided by foo_playlist_attributes.



Re: JScript Panel

Reply #554
v2.6.0-Beta.3 https://github.com/marc2k3/foo_jscript_panel/releases

- Add `fb.AddLocationsAsync`. Similar to `plman.AddLocations` except rather than specifiying a target playlist, you get the processed handles to a new `on_locations_added` callback.
- Add `plman.AddPlaylistLock` / `plman.RemovePlaylistLock`. Use in conjunction with the existing `plman.IsPlaylistLocked`, `plman.GetPlaylistLockFilterMask` and `plman.GetPlaylistLockName` methods. The `on_playlists_changed` callback will be triggered when locks are added/removed. See docs for full details.
- (Beta.2) Add `plman.ShowPlaylistLockUI`. This only works if the playlist is unlocked or the lock is owned by `JScript Panel`. Provides a popup dialog with checkboxes for toggling the various options on/off.
- (Beta.3) Minor bug fix for `plman.ShowPlaylistLockUI` removing/adding playlist locks which triggered the `on_playlists_changed` callback even when nothing had changed.
- (Beta.3) Update the playlist manager built in to `JSPlaylist` so it can manage playlist locks from the context menu. Additionally, full support for restoring/purging deleted playlists has been added using the `plman` `recycler` methods. Although this functionality has been in the component for a very long time, it's not been exposed in any included sample before.

Screenshot of JSPlaylist manager options:



Re: JScript Panel

Reply #555
v2.6.0 final https://github.com/marc2k3/foo_jscript_panel/releases

- Add `fb.AddLocationsAsync`. Similar to `plman.AddLocations` except rather than specifiying a target playlist, you get the processed handles to a new `on_locations_added` callback.
- Add `plman.AddPlaylistLock` / `plman.RemovePlaylistLock`. Use in conjunction with the existing `plman.IsPlaylistLocked`, `plman.GetPlaylistLockFilterMask` and `plman.GetPlaylistLockName` methods. The `on_playlists_changed` callback will be triggered when locks are added/removed. See docs for full details.
- Add `plman.ShowPlaylistLockUI`. This only works if the playlist is unlocked or the lock is owned by `JScript Panel`. Provides a popup dialog with checkboxes for toggling the various options on/off.
- Update the playlist manager built in to `JSPlaylist` so it can manage playlist locks from the context menu. Additionally, full support for restoring/purging deleted playlists has been added using the `plman` `recycler` methods. Although this functionality has been in the component for a very long time, it's not been exposed in any included sample before.
- The `JScript Panel` stats section on the `Properties` dialog, `Details` tab is now hidden unless there is actual data to display.

Re: JScript Panel

Reply #556
I'm aware of a bug in the new version where the line numbers in the editor are not shown. I will try and fix this soon but I'm battling a new version of the Scintilla library which provides that functionality. I may have to revert to the old version if I lose.


Re: JScript Panel

Reply #558
v2.6.0.2 https://github.com/marc2k3/foo_jscript_panel/releases

- Fixes a regression in v2.6.0 where selected text in the Configuration Window may have become hard to read when the window lost focus.
- Because of the above change, colour/font changes have been reset. Also, the Editor Properties found under File>Preferences>Tools>JScript Panel have been simplified.
- Doc fixes.

Not sure if anyone is running their own totally custom themes but if you are, you should set a custom colour for style.selection.back here...



If left blank like the previous defaults/themes, you may have the same issue I just "fixed".

Re: JScript Panel

Reply #559
Hi,
Is it possible to display the album art of playing track with blurred effect?
Like combining both "album art" and "StackBlur (image)" scripts in one panel. I saw this on Eole, but I don't know how to do it myself.

Re: JScript Panel

Reply #560
Not entirely sure what you're after but you could try playing around with this??

Code: [Select]
// ==PREPROCESSOR==
// @name "Album Art"
// @author "marc2003"
// @import "%fb2k_component_path%samples\complete\js\lodash.min.js"
// @import "%fb2k_component_path%samples\complete\js\helpers.js"
// @import "%fb2k_component_path%samples\complete\js\panel.js"
// @import "%fb2k_component_path%samples\complete\js\albumart.js"
// ==/PREPROCESSOR==

//////////////////////////////////////////////////
// edit these

var border = 100;
var blur_radius = 150;

//////////////////////////////////////////////////

var panel = new _.panel('custom_background');
var albumart = new _.albumart(0, 0, 0, 0);
albumart.blur_img = null;

panel.item_focus_change();

function on_size() {
panel.size();
albumart.x = albumart.y = border;
albumart.w = panel.w - (border * 2);
albumart.h = panel.h - (border * 2);
}

function on_paint(gr) {
panel.paint(gr);
if (albumart.blur_img) {
_.drawImage(gr, albumart.blur_img, 0, 0, panel.w, panel.h, image.crop);
}
albumart.paint(gr);
}

function on_playback_dynamic_info_track(type) {
if (type == 1) panel.item_focus_change();
}

function on_metadb_changed() {
_.dispose(albumart.blur_img);
albumart.blur_img = null;
albumart.metadb_changed();
if (albumart.img) {
albumart.blur_img = albumart.img.Clone(0, 0, albumart.img.Width, albumart.img.Height);
albumart.blur_img.StackBlur(blur_radius);
}
window.Repaint();
}

function on_mouse_wheel(s) {
albumart.wheel(s);
}

function on_mouse_move(x, y) {
albumart.move(x, y);
}

function on_mouse_lbtn_dblclk(x, y) {
albumart.lbtn_dblclk(x, y);
}

function on_mouse_rbtn_up(x, y) {
return panel.rbtn_up(x, y, albumart);
}

function on_key_down(k) {
albumart.key_down(k);
}

Re: JScript Panel

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

## v2.6.1
- `window.GetFontCUI` and `window.GetFontDUI` have been updated so they never return null on failure. `Segoe UI` will be used instead.
- `gdi.Font` has also been updated so if it fails, the fallback font is `Segoe UI`. Previous fallbacks were not always predictable and there could be mismatches between the `.Name` property and what was actually used. In theory, that should not happen now.
- Add `utils.ListFonts`.

Re: JScript Panel

Reply #562
Back by unpopular demand is my ye olde sox spectrogram seekbar from the WSH panel mod days.

You'll need sox and ffmpeg extracted to a folder named sox inside your profile folder (or edit the paths in the script)

Limitations:
since the script passes the filename to ffmpeg for decoding, your input components are irrelevant
it only works on local files with a known length
cue sheets/files with chapters are not supported

Re: JScript Panel

Reply #563
I forgot to mention that FontAwesome is required.

https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true

I also forgot to make it clear the image when playback stops. I've attached a fixed version.

Re: JScript Panel

Reply #564
Why would the current version (including other versions from the last year or so) of foo_jscript_panel crash when I run any of the sample panels like JS Smooth? It shuts down Foobar2000 (latest version) and it won't load back up again unless I go into safe mode.

The earlier versions like 2.3.0.1 work fine.

Thanks.

Re: JScript Panel

Reply #565
I'm not aware of any issues with the current version?? I assume you're using the link in my sig to get it??

The 2.3.x series was not good and known to crash on f2bk v1.6 Unfortunately some bad code got in that worked fine on fb2k v1.4/v1.5 but was brutally exposed by the release of fb2k v1.6!! But that bug was fixed within a few hours of me first noticing it and while they have been a few more bugs since, I generally try and fix them immediately and I've not had any crash reports submitted with any recent versions.

Re: JScript Panel

Reply #566
Thanks for getting back. Actually, it turns out I didn't have the panel from your link installed. I had 2.3.6.1. Odd how that page makes it look like it's the latest.

Anyway, I have a new problem. :) 2.6.1 works but when I right click on JS Smooth and select any option (for example, Properties) I get an orange screen with JavaScript Error. 

The error message says... \profile\user-components\foo_jscript_panel\samples\js-smooth\js\jssp.js
Line: 2561, Col: 4

Any idea? Thanks.

EDIT... JS Playlist does not have that issue. Only JS Smooth.

Re: JScript Panel

Reply #567
Forgot to include: 'ret' is undefined.

Re: JScript Panel

Reply #568
I seemed to have fixed it. (Probably a band-aid solution).  I renamed the three traces of "ret" to "idx" and now it works.

Re: JScript Panel

Reply #569
Heh, you did find bugz in the JS-Smooth playlist. Your fixes were correct.

https://github.com/marc2k3/foo_jscript_panel/commit/5362e350c0822bc9006c390899ea30c51dc42330

I guess you must be the first to use it in a long time. Sorry about that!




Re: JScript Panel

Reply #570
No problem. I'm just glad it's been updated. For the longest time (since Nov 2015) it's had a bug where the cover art wouldn't refresh properly. 

Re: JScript Panel

Reply #571
Any ideas why the artwork on the JS Smooth panel is cut off at all four corners of the sides? Like some albums might have a border on the edges of the artwork but on JS Smooth Panel the borders would be cut off. The artwork displays fine on JS Playlist.

Anyway, I'm not really expecting any outcome here since there's not much love for these panels anymore, but just thought I'd mention it.

Update... I think I found where to fix this. It's in the common file (I was spending all my time in the jssp file). This line to be exact...


Quote
gr.DrawImage(img, src_x, src_y, src_w, src_h, dst_x + 3, dst_y + 3, dst_w - 6, dst_h - 6, 0, alpha || 255);

 

Re: JScript Panel

Reply #573
Just realised the above comment applies to JS Smooth Browser only - not the playlist. I'll consider adding a similar option in the next version.

edit: changes have been made but I don't have plans for a new component any time soon. Here are the updated files if you want to save them in your own samples\js-smooth\js folder.

https://raw.githubusercontent.com/marc2k3/foo_jscript_panel/develop/component/samples/js-smooth/js/JScommon.js
https://raw.githubusercontent.com/marc2k3/foo_jscript_panel/develop/component/samples/js-smooth/js/jssp.js

After reloading the script, you should have a new option when clicking in the top right area-  Group Headers>Album Art: auto-fill (uncheck it)

Re: JScript Panel

Reply #574
Cool, thanks!  Hey, I have another question and I promise I won't bother you anymore. :)

I notice with Jscript 2.61 and 2.56 you can't drag and drop files into both JS Smooth and JS Playlist UNLESS there is a playlist already made. If there is no playlist they won't let you drag.  JScript 2.3.0.1 (possibly others) will let you do this.

Is there an easy solution to this? Thanks, again.

 
SimplePortal 1.0.0 RC1 © 2008-2021