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

Re: JScript Panel script discussion/help

Reply #300
If you rename the downloaded file from lastfm.jpg to front.jpg, does the panel then display it?
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #301
If you rename the downloaded file from lastfm.jpg to front.jpg, does the panel then display it?

I edited the script so that it downloads it as "front.jpg" by default, but in order to see it in the panel I have to embed the picture first.
I'm late

Re: JScript Panel script discussion/help

Reply #302
Okay... I missed what you'd written there. Sounds like you need the script to recognize 2 different cover art names... front.jpg for your embedded tags, and now lastfm.jpg that this script is creating.   I had this problem of with another script a while ago where I wanted the script to look for art in a couple places.  But as I recall, the script (I think in Br3tt's Kameleon) wouldn't allow it.  marc2003 or someone else may be able to tell you if it's possible.

Or... you need something to automatically write the downloaded file to the tags... if I back up I think that's what you were asking.
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #303
directory_path(%path%)\front.jpg (I edited the script accordingly at line 17)
Wait... line 17 is from marc's lastest offering above.  That crashed every copy of FB2k I tried pasting it into a jscript panel.  Did you get it to work?

The code in that script is: var filename_tf = fb.TitleFormat("lastfm.jpg");
Geopoliticus Child Watching the Birth of the New Man


Re: JScript Panel script discussion/help

Reply #305
Man... This script?  It's crashed every time I've tried putting into a jscript panel. Maybe I need the newer foo_jscript_panel-v1.1.4.

Code: [Select]
// ==PREPROCESSOR==
// @name "Last.fm Album Art Downloader"
// @author "marc2003"
// @import "%fb2k_profile_path%js_marc2003\js\lodash.min.js"
// @import "%fb2k_profile_path%js_marc2003\js\helpers.js"
// @import "%fb2k_profile_path%js_marc2003\js\panel.js"
// @import "%fb2k_profile_path%js_marc2003\js\albumart.js"
// ==/PREPROCESSOR==

// Affects downloads only. Album art will always be displayed if it's found via the patterns
// in the main preferences.
var library_tracks_only = false;
// Note that any attempt to use a folder that doesn't already exist will silently fail
var folder_tf = fb.TitleFormat("$directory_path(%path%)\\");
// Make sure File>Preferences>Display>Album art>Front matches this filename for the image
// to be displayed. Title formatting is supported.
var filename_tf = fb.TitleFormat("lastfm.jpg");

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

var panel = new _.panel("Last.fm Album Art Downloader", ["metadb", "custom_background"]);
var albumart = new _.albumart(0, 0, 0, 0);
var x = new ActiveXObject("Microsoft.XMLHTTP");
var ini = folders.settings + "album-art.ini";
_.createFolder(folders.settings);

panel.item_focus_change();

function on_size() {
panel.size();
albumart.w = panel.w;
albumart.h = panel.h;
}

function on_paint(gr) {
panel.paint(gr);
albumart.paint(gr);
}

function on_metadb_changed() {
albumart.metadb_changed();
var np = fb.GetNowPlaying();
if (panel.metadb && np && np.Compare(panel.metadb) && np.RawPath.indexOf("file://") == 0 && (!library_tracks_only || fb.IsMetadbInMediaLibrary(np))) {
var ar = panel.tf("%album artist%");
var al = panel.tf("%album%");
var f = folder_tf.EvalWithMetadb(panel.metadb) + _.fbSanitise(filename_tf.EvalWithMetadb(panel.metadb));
var tmp = _.q(_.fbSanitise(ar + al));
var n = _.round(_.now() / 1000);
var t = utils.ReadINI(ini, "Timestamps", tmp, 0);

switch (true) {
case !_.tagged(ar):
case !_.tagged(al):
case _.isFile(f):
case n - t < ONE_DAY:
break;
default:
utils.WriteINI(ini, "Timestamps", tmp, n);
x.open("GET", "http://www.last.fm/music/" + encodeURIComponent(ar) + "/" + encodeURIComponent(al) + "/+images", true);
x.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT");
x.send();
x.onreadystatechange = function () {
if (x.readyState == 4) {
if (x.status == 200) {
var o = _.first(_.filter(_.getElementsByTagName(x.responsetext, "img"), {"className" : "image-list-image"}));
if (o) {
var u = o.src.replace("avatar170s", "ar0");
_.runCmd("cscript //nologo " + _.q(folders.home + "download.vbs") + " " + _.q(u) + " " + _.q(f), false);
window.SetTimeout(function () {
panel.item_focus_change();
}, 3000);
}
} else {
panel.console("HTTP error: " + x.status);
}
}
}
break;
}
}
}

function on_get_a
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #306
Man... This script?  It's crashed every time I've tried putting into a jscript panel. Maybe I need the newer foo_jscript_panel-v1.1.4.

Code: [Select]
// ==PREPROCESSOR==
// @name "Last.fm Album Art Downloader"
// @author "marc2003"
// @import "%fb2k_profile_path%js_marc2003\js\lodash.min.js"
// @import "%fb2k_profile_path%js_marc2003\js\helpers.js"
// @import "%fb2k_profile_path%js_marc2003\js\panel.js"
// @import "%fb2k_profile_path%js_marc2003\js\albumart.js"
// ==/PREPROCESSOR==

// Affects downloads only. Album art will always be displayed if it's found via the patterns
// in the main preferences.
var library_tracks_only = false;
// Note that any attempt to use a folder that doesn't already exist will silently fail
var folder_tf = fb.TitleFormat("$directory_path(%path%)\\");
// Make sure File>Preferences>Display>Album art>Front matches this filename for the image
// to be displayed. Title formatting is supported.
var filename_tf = fb.TitleFormat("lastfm.jpg");

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

var panel = new _.panel("Last.fm Album Art Downloader", ["metadb", "custom_background"]);
var albumart = new _.albumart(0, 0, 0, 0);
var x = new ActiveXObject("Microsoft.XMLHTTP");
var ini = folders.settings + "album-art.ini";
_.createFolder(folders.settings);

panel.item_focus_change();

function on_size() {
 panel.size();
 albumart.w = panel.w;
 albumart.h = panel.h;
}

function on_paint(gr) {
 panel.paint(gr);
 albumart.paint(gr);
}

function on_metadb_changed() {
 albumart.metadb_changed();
 var np = fb.GetNowPlaying();
 if (panel.metadb && np && np.Compare(panel.metadb) && np.RawPath.indexOf("file://") == 0 && (!library_tracks_only || fb.IsMetadbInMediaLibrary(np))) {
 var ar = panel.tf("%album artist%");
 var al = panel.tf("%album%");
 var f = folder_tf.EvalWithMetadb(panel.metadb) + _.fbSanitise(filename_tf.EvalWithMetadb(panel.metadb));
 var tmp = _.q(_.fbSanitise(ar + al));
 var n = _.round(_.now() / 1000);
 var t = utils.ReadINI(ini, "Timestamps", tmp, 0);
 
 switch (true) {
 case !_.tagged(ar):
 case !_.tagged(al):
 case _.isFile(f):
 case n - t < ONE_DAY:
 break;
 default:
 utils.WriteINI(ini, "Timestamps", tmp, n);
 x.open("GET", "http://www.last.fm/music/" + encodeURIComponent(ar) + "/" + encodeURIComponent(al) + "/+images", true);
 x.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT");
 x.send();
 x.onreadystatechange = function () {
 if (x.readyState == 4) {
 if (x.status == 200) {
 var o = _.first(_.filter(_.getElementsByTagName(x.responsetext, "img"), {"className" : "image-list-image"}));
 if (o) {
 var u = o.src.replace("avatar170s", "ar0");
 _.runCmd("cscript //nologo " + _.q(folders.home + "download.vbs") + " " + _.q(u) + " " + _.q(f), false);
 window.SetTimeout(function () {
 panel.item_focus_change();
 }, 3000);
 }
 } else {
 panel.console("HTTP error: " + x.status);
 }
 }
 }
 break;
 }
 }
}

function on_get_a

I'm talking about this script.
I'm late

Re: JScript Panel script discussion/help

Reply #307
I found the problem davideleo ... I copied the code to the bottom of the github page marc posted, but I failed to notice I'd missed a little more that was underneath.  My bad    :-[   All's good now  ;)
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #308
I'm new to jscript and after following the tutorials I built the following script.  Everything displays correctly, but the loop I have keeps re-drawing the panel.  Was wondering if there's a way to keep the loop from re-drawing or is there a way to just re-draw the section where time elapse and time remaining counts up and down?

Hope this makes sense  :)  Thanks in advance for any help or comments (also thanks for marc2003 for making the jscript plugin)


Code: [Select]
// ==PREPROCESSOR==
// @name "Title Header"
// @author "Chigaimaro"
// @feature "watch-metadb"
// @import "%fb2k_component_path%docs\flags.txt"
// @import "%fb2k_component_path%docs\helpers.txt"
// ==/PREPROCESSOR==

var setTitlefont = gdi.Font("Segoe UI", 16.5,0);
var artist_font = gdi.Font("Segoe UI", 13,0);
var album_font = gdi.Font("Segoe UI", 12,0);



var g_is_default_ui = window.InstanceType;
var g_font = null;
var ww = 0, wh = 0;
var g_textcolor = 0, g_textcolor_hl = 0;
var g_backcolor = 0;
var time_font = gdi.Font("Segoe UI", 18, 0);
var stat_font = gdi.Font("Segoe UI", 13, 0);
var counter = 0;
get_font();
get_colors();

   

function get_font() {
    if (g_is_default_ui) { // DUI
        g_font = window.GetFontDUI(FontTypeDUI.defaults);
    } else { // CUI
        g_font = window.GetFontCUI(FontTypeCUI.items);
    }
}

function get_colors() {
    if (g_is_default_ui) { // DUI
        g_textcolor = window.GetColorDUI(ColorTypeDUI.text);
        g_textcolor_hl = window.GetColorDUI(ColorTypeDUI.highlight);
        g_backcolor = window.GetColorDUI(ColorTypeDUI.background);
        g_selectcolor = window.GetColorDUI(ColorTypeDUI.selection);
    } else { // CUI
        g_textcolor = window.GetColorCUI(ColorTypeCUI.text);
        g_textcolor_hl = window.GetColorCUI(ColorTypeCUI.text);
        g_backcolor = window.GetColorCUI(ColorTypeCUI.background);
    }
}



function on_size() {
    ww = window.Width;
    wh = window.Height;
}

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, g_backcolor);
    for(counter = 0; counter < 6; counter++){
    var allMargin = ["0", "110", "220", "330", "440", "550"];
    var time_tags = [fb.TitleFormat("%playback_time%").Eval(),
        fb.TitleFormat("%playback_time_remaining%").Eval(),
        fb.TitleFormat("%length%").Eval(),
        fb.TitleFormat("$if2(%tracknumber%,'00')/$if2(%totaltracks%,'00')").Eval(),
        fb.TitleFormat("$if(%discnumber%,$pad_right(%discnumber%,2),'00')$if(%totaldiscs%,'/'$pad_right(%totaldiscs%,2),)").Eval(),
        fb.TitleFormat("[%replaygain_track_gain%]')").Eval()
            ]
    var labels = ["Elapsed", "Remaining", "Length", "Track/Total", "Disc/Total", "Replaygain"];
    var info_tags = [fb.TitleFormat("$info(encoding)").Eval(),
        fb.TitleFormat("$info(codec)").Eval(true),
        fb.TitleFormat("$if($info(bitrate),$info(bitrate)' kb/s','00 kb/s')").Eval(),
        fb.TitleFormat("$channels()").Eval(true),
        fb.TitleFormat("%__bitspersample%-bits").Eval(true),
        fb.TitleFormat("$info(samplerate) hz").Eval()
            ]
        tagNames = String(time_tags[counter]);
        infoNames = String(info_tags[counter]);
        labelNames = labels[counter];
        xPosition = Number(allMargin[counter]);
        gr.FillSolidRect(xPosition+5, wh - 30, 100, 20, RGBA(220,220,220,025));
        gr.DrawRoundRect(xPosition+5, wh - 30, 100, 20, 4, 4, 1, g_selectcolor);
        gr.FillGradRect(0,(wh / 2), ww, 2, 180, g_backcolor, (g_selectcolor + g_textcolor), focus = 0.5);
        gr.GdiDrawText(labelNames, stat_font, (g_selectcolor + g_backcolor), xPosition+5, wh-75, 100, 30, DT_VCENTER| DT_CALCRECT | DT_CENTER);
        if(fb.IsPlaying) {
        gr.GdiDrawText(tagNames, time_font, g_textcolor_hl, xPosition+5, wh-58, 100, 30, DT_VCENTER| DT_CALCRECT | DT_CENTER);
        gr.GdiDrawText(infoNames, stat_font, g_textcolor, xPosition+5, wh-35, 100, 30, DT_VCENTER| DT_CALCRECT | DT_CENTER);   
        gr.GdiDrawText(fb.TitleFormat("$if2(%TITLE%,'N/A')").Eval(), setTitlefont, g_textcolor, 0, 0, ww, wh, DT_WORDBREAK | DT_CALCRECT | DT_CENTER | DT_END_ELLIPSIS);
        titleCount = gr.MeasureString(fb.TitleFormat("$if2(%TITLE%,'N/A')").Eval(), setTitlefont, 0, 0, ww, wh);
        fb.trace(titleCount.Height);
        gr.GdiDrawText(fb.TitleFormat("by: $if(%ARTIST%,%ARTIST%[' feat.'%ARTISTFEATURED%],'N/A')").Eval(), artist_font, g_textcolor_hl, 0, titleCount.Height+3, ww, wh, DT_WORDBREAK | DT_CALCRECT | DT_CENTER | DT_END_ELLIPSIS);
        artistCount = gr.MeasureString(fb.TitleFormat("$if(%ARTIST%,%ARTIST%[' feat.'%ARTISTFEATURED%],'N/A')").Eval(), artist_font, 0, 0, ww, wh);
        gr.GdiDrawText(fb.TitleFormat("On Album: $if(%ALBUM%,%ALBUM%$if(%RELEASE_DATE%,' ('%RELEASE_DATE%')',' ('%DATE%')'),'N/A')").Eval(), album_font, g_selectcolor, 0, (artistCount.Height + titleCount.Height + 5), ww, wh, DT_WORDBREAK | DT_CALCRECT | DT_CENTER | DT_END_ELLIPSIS);
               }
           }
}

function on_font_changed() {
    get_font();
    window.Repaint();
}

function on_colors_changed() {
    get_colors();
    window.Repaint();
   
}

function on_playback_stop(reason) {
    if(reason != 2) window.Repaint();
}

function on_playback_new_track() {
    window.Repaint();
}

function on_playback_time() {
   window.RepaintRect(0, wh-60, 400, 25);
}

Re: JScript Panel script discussion/help

Reply #309
That's a WSH panel script from his DeviantArt page, right?  I did give that try and had considered using it as an alternative.  But since I last posted, I've confirmed that both jsplaylist and his smooth playlist prevent FB2K from completely shutting down in Windows 10.  I had to delete panels 1 by 1 until I finally found the culprit.  Wonder if your mod would be any different.  Have you made it available for download anywhere?

I can't imagine why you'd have that issue with the original jsplaylist. The modifications I've made are very minor so are unlikely to change anything in that regard. It can be found via the link in my signature.

It works good for me. Is there a simple script line I could add to automatically attach the picture to all the files in the folder after downloading it?

No.

I edited the script so that it downloads it as "front.jpg" by default, but in order to see it in the panel I have to embed the picture first.

That would only happen if the file already has art embedded in it?? What gets displayed first depends on this setting:

File>Preferences>Advanced>Display>Album art>Embedded vs external.

or is there a way to just re-draw the section where time elapse and time remaining counts up and down?

I've not tried the script but it looks like you're already doing that with window.RepaintRect(x,y,w,h)  ??

Re: JScript Panel script discussion/help

Reply #310
I can't imagine why you'd have that issue with the original jsplaylist. The modifications I've made are very minor so are unlikely to change anything in that regard. It can be found via the link in my signature.

I did some relatively extensive testing today marc.  I found that if there is a panel with one of your jscripts in a very basic FB2K build that includes panels with either Br3tt's SP or your jsplaylist-mod, FB2K will not fully shut down in Windows 10.  I detailed the tests I did on SP in a reply to Br3tt on DA.

Had the same problem with Br3tt's older wsh panel mod JSPlaylist.
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #311
Try a brand new portable install with no components except JScript panel. Add jsplaylist-mod as the only panel in the layout so it looks like the screenshot on my github page. Now play some music and see if foobar closes.

Re: JScript Panel script discussion/help

Reply #312
I'll try that later today marc.  I'm pretty sure foobar will shut down fine.  As I pointed out to Br3tt, it's only been when I have one of his scripts in a panel in foobar along with just 1 of 3 of your jscripts that Win10 that doesn't fully shut down: 'thumbs', 'now playing' & 'Last.fm Album Art Downloader'.  Just 2 panels and nothing else.  I don't think any of your other scripts cause the problem, but I'll test them

Edit: DA seems to be down at the moment.

Edit 2: jsplaylist-mod set up quickly.  I didn't find the Github screenshot, but I used 'View > Layout > Enable layout mode editing' to clear what was there, add a jscript panel and pasted in jsplaylist-mod. 
Added tracks played fine, and foobar shut down in Win10 fine.
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #313
I edited the script so that it downloads it as "front.jpg" by default, but in order to see it in the panel I have to embed the picture first.

That would only happen if the file already has art embedded in it?? What gets displayed first depends on this setting:

File>Preferences>Advanced>Display>Album art>Embedded vs external.

Of course, my foobar is set to display the embedded art first and that's exactly how I want it to be, it's not an issue. What I was asking for is if it is possible to preview the lastfm picture before I embed it or even download it, like the foo_uie_biography component does. I would actually like the features of both the biography view component and your script. If I can remember correctly one of your WSH album art reader would show an online picture instead of the blank background.
I'm late

Re: JScript Panel script discussion/help

Reply #314
If you want to preview images before downloading, I suggest using dedicated app like album art downloader. It has many more options and sources that are much better than the crap on last.fm.

https://hydrogenaud.io/index.php/topic,57392.0.html

Or you could just use my standard artwork panel right click option that launches google images in a browser with the artist/album as search terms.

Re: JScript Panel script discussion/help

Reply #315
Or you could just use my standard artwork panel right click option that launches google images in a browser with the artist/album as search terms.

That's what I've been doing with a run service script.  Clicking your panel is a lot more convenient method to launch a browser search though. Kudos marc... it's brillant  :) 
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #316
If you want to preview images before downloading, I suggest using dedicated app like album art downloader. It has many more options and sources that are much better than the crap on last.fm.

https://hydrogenaud.io/index.php/topic,57392.0.html

I know that software, but I never found it really useful. I prefer a foobar component because it allows me to check the album art on the go, while I'm listening and eventually preview the new picture in the exact size and context it will actually look in the player once it is downloaded and embedded.
Anyway, I just found out the biography view component has an automatically download option which I never noticed until today!



I'm late

Re: JScript Panel script discussion/help

Reply #317
Clicking your panel is a lot more convenient method to launch a browser search though. Kudos marc... it's brillant  :)

I think google images is pretty much the best way to source art. It will usually have high quality art from amazon or the artist's own site/record label near the top of the search results and of course you can filter the image size. I then right click a playlist entry>open containing folder and drag the file straight from the browser in to explorer. Then with the file highlighted, press F2 to rename it. OK, it's a few manual steps but it's worth it.

Re: JScript Panel script discussion/help

Reply #318
I think google images is pretty much the best way to source art. It will usually have high quality art from amazon or the artist's own site/record label near the top of the search results and of course you can filter the image size. I then right click a playlist entry>open containing folder and drag the file straight from the browser in to explorer. Then with the file highlighted, press F2 to rename it. OK, it's a few manual steps but it's worth it.
Wow... drag and drop.  Nice.  I've been going a similar route, but I start with opening the track folder, copying the path, right-clicking the art panel and selecting google search.  When I find the cover art I select 'View Image', right-click and select 'Save Image As', paste the path to the track's folder, save it, rename it.  I like your method better marc.  :)
Geopoliticus Child Watching the Birth of the New Man

 

Re: JScript Panel script discussion/help

Reply #319
Try a brand new portable install with no components except JScript panel. Add jsplaylist-mod as the only panel in the layout so it looks like the screenshot on my github page. Now play some music and see if foobar closes.

Well I learned how to set up foobar via "Enable Layout Editing Mode' in the default UI today instead of using columns UI as I have for years.  I downloaded jsplaylist-mod from GitHub, extracted the zip, renamed 'js-marc2003-master' to just 'js-marc2003 and copied it to the foobar root directory.  In the default foobar installation I went to preferences > components and added foo_jscript_panel-v1.1.4.fb2k-component.  Enabled layout editing and deleted the 2 existing sections of the layout, inserted just one JScript Panel. and copied the script from "jsplaylist main script.txt" to it  Added tracks and played them.  Stopped playback and shut down foobar.  Foobar shut down in Win10 completely.



So I took it to the next step, and starting from scratch added marc's Now Playing JScript panel to what I'd just made.  That 1st involved downloading the latest js-marc2003 scripts from GitHub, and then extracting the contents of the zip to the \js_marc2003 folder in foobar.  This time I configured a left / right (horizontal in Columns UI) splitter, added 2 JScript panel panels, and put the "now playing (basic).txt" script in one and "jsplaylist main script.txt" in the other.  That got me this:



Unfortunately after playing a few tracks, stopping, and then shutting down foobar, it remained in Windows 10's Task Manger and I had to end task in order to completely shut down foobar and restart it.

If that wasn't disconcerting enough, when I started it up again and began playback, on the 3rd or 4th track, I was presented with a whole new issue:

Geopoliticus Child Watching the Birth of the New Man


Re: JScript Panel script discussion/help

Reply #321
If that wasn't disconcerting enough, when I started it up again and began playback, on the 3rd or 4th track, I was presented with a whole new issue:

Here's the script's error message:
Code: [Select]
JScript Panel (np_basic by marc2003): Microsoft JScript runtime error:
Permission denied
File: C:\Foobar2000\js_marc2003\js\thumbs.js
Line: 526, Col: 6
<source text only available at compile time>

var url = item.src.replace("avatar170s", "ar0");
Code: [Select]
		this.success = function (base) {
_(_.getElementsByTagName(this.xmlhttp.responsetext, "img"))
.filter({"className" : "image-list-image"})
.take(this.download_limit)
.forEach(function (item) {
var url = item.src.replace("avatar170s", "ar0");
var filename = base + url.substring(url.lastIndexOf("/") + 1) + ".jpg";
_.runCmd("cscript //nologo " + _.q(folders.home + "download.vbs") + " " + _.q(url) + " " + _.q(filename), false);
})
.value();
}
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #322
Can you run process explorer and see if anything is showing as "child" of foobar2000.exe? Also, right click foobar2000.exe>Properties>Threads tab and see if anything is using any CPU?

https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

As for the script error, not had that before and I even tested using the same artist as you just now and it was fine. I guess you could try this...

Code: [Select]
		this.success = function (base) {
_(_.getElementsByTagName(this.xmlhttp.responsetext, "img"))
.filter({"className" : "image-list-image"})
.take(this.download_limit)
.forEach(function (item) {
var src = item.src;
var url = src.replace("avatar170s", "ar0");
var filename = base + url.substring(url.lastIndexOf("/") + 1) + ".jpg";
_.runCmd("cscript //nologo " + _.q(folders.home + "download.vbs") + " " + _.q(url) + " " + _.q(filename), false);
})
.value();
}

Re: JScript Panel script discussion/help

Reply #323
Can you run process explorer and see if anything is showing as "child" of foobar2000.exe? Also, right click foobar2000.exe>Properties>Threads tab and see if anything is using any CPU?

I see nothing as a child:


There are a few threads using minimal CPU:


Will try your code later on.  Meanwhile Br3tt replied to my test results on DA and found my link between SP and your scripts to be interesting & something he'll look into.
Geopoliticus Child Watching the Birth of the New Man

Re: JScript Panel script discussion/help

Reply #324
Were those screenshots taken at a time you were unable to close foobar? I forgot to mention it but I thought it would be obvious....

edit: Just looked at DA and I don't understand this...

"During my tests today I did see a connection between SP and marc2003's jscripts.  His Album Art Downloader panel will notice the thumbnail SP creates for mp3s lacking album tags"

IIRC, smooth playlist creates a cache of artwork inside the js_br3tt folder and my script uses the main foobar2000 preferences. Did you really configure your setup to look inside that folder?

edit2: jsplaylist-mod (and the original jsplaylist for WSH panel mod) don't use any external cached images and use the same main preferences as my scripts.