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: WSH Panel Mod script discussion/help (Read 1401640 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #3850
1.2.3 is better but now i have a little problem using custom colours. i'd rather not use custom colours but i have to because your highlight text colour on a dark theme is black.

this screenshot is with custom colours off....



if i enable custom colours to fix the playlist then it breaks the list box display in the settings panel.


WSH Panel Mod script discussion/help

Reply #3851
falstaff

In marc2003 artreader script is very usefull option.  We can crop, stretch or center album art image.

It's possible apply this to album art (as wallpaper) in your very nice script.

WSH Panel Mod script discussion/help

Reply #3852
@marc2003

can you show me you custom colors settings please (the 5 ones) and you CUI colors settings ?

@piv

i don't want that, for me crop is the only way for the wallpaper (stretch: no comment, and center: empty bars on the sides of the image, nope)

WSH Panel Mod script discussion/help

Reply #3853
@marc2003

let fall, i've done a change (v1.2.4) to use specific colors pour listbox as done for textbox, that will fix all the color problems (normally)

WSH Panel Mod script discussion/help

Reply #3854
here are my custom colours

i've set that to white and turned off custom colours which fixes the playlist issue in my first screenshot above. now there is the minor issue of the listbox but i can live with it as it is...



WSH Panel Mod script discussion/help

Reply #3856
tres bien. merci beaucoup. 

WSH Panel Mod script discussion/help

Reply #3857
Hi,

I can't seem to figure out how to get this to work:
With this code:
Code: [Select]
function getTags(tagName){
  var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')');
  return tagValuesCount
};
fb.trace(getTags(CustomTag));


I get this error:
'CustomTag' is undefined.

The problem lies in the quotes I think.
With the quotes I don't get an undefined error , but also no result.
Without the quotes it's the undefined error.
<3 f00

WSH Panel Mod script discussion/help

Reply #3858
you need to use either Eval() or EvalWithMetadb on your titleformat function. you need to use eval if you want dynamic values from the playing track like playback time, bitrate or artist/title from streams

Code: [Select]
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').Eval();


if you only want static data from the playing item or perhaps the selected track, you use this...

Code: [Select]
var metadb = fb.GetNowPlaying(); //or
var metadb = fb.GetFocusItem();
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').EvalWithMetadb(metadb);

WSH Panel Mod script discussion/help

Reply #3859
you need to use either Eval() or EvalWithMetadb on your titleformat function. you need to use eval if you want dynamic values from the playing track like playback time, bitrate or artist/title from streams

Code: [Select]
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').Eval();


if you only want static data from the playing item or perhaps the selected track, you use this...

Code: [Select]
var metadb = fb.GetNowPlaying(); //or
var metadb = fb.GetFocusItem();
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').EvalWithMetadb(metadb);


I tried both codes, but it still give me an undefined error.

When You use $meta_num normally in fb2k , you don't have to use % in that.
So no $meta_num(%tag%) but $meta_num(tag).
Well, when I want to check if the artist tag has multiple values in WSH,
I have the problem that when I call the function getTags(artist), WSH sees artist as an undefined variable.
<3 f00

WSH Panel Mod script discussion/help

Reply #3860
these 4 lines of code in a fresh panel work fine.

Code: [Select]
var tagName = "artist";
var metadb = fb.GetFocusItem();
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').EvalWithMetadb(metadb);
fb.trace(tagValuesCount);


or

Code: [Select]
fb.trace(fb.TitleFormat("$meta_num(artist)").EvalWithMetadb(fb.GetFocusItem()));

WSH Panel Mod script discussion/help

Reply #3861
these 4 lines of code in a fresh panel work fine.

Code: [Select]
var tagName = "artist";
var metadb = fb.GetFocusItem();
var tagValuesCount = fb.TitleFormat('$meta_num('+tagName+')').EvalWithMetadb(metadb);
fb.trace(tagValuesCount);


or

Code: [Select]
fb.trace(fb.TitleFormat("$meta_num(artist)").EvalWithMetadb(fb.GetFocusItem()));


Thanks for the quick response.

You're right it does work.
Thanks
<3 f00

WSH Panel Mod script discussion/help

Reply #3862
marc2003: The musicbrainz script crashes now and then for me. I set it to follow cursor instead of now playing, and it usually crashes when I click on many different artist in a short time. I didn't see any crashes when I tested setting it to follow now playing... The message is "common8.js Ln: 2348, Col: 5 <source text only available at compile time>" If I reload the panel it works again. I have updated the script and use your version of the component.

I also thought it would be nice to group releases... For me it would be best to group studio albums on top, and then still show other types below. Look for instance at Pearl Jam, just lots of live albums . But you might still want to show the type, especially for some other artists.

WSH Panel Mod script discussion/help

Reply #3863
i can't seem to reproduce that bug but i think it's a good idea to prevent lots of requests when switching artists quickly so i'll look at doing something about that.

i did take a look at pearl jam and that's a ridiculous amount of live albums.  grouping would be nice but i'm notoriously lazy. in the meantime you can just hide them temporarily using the right click menu.


WSH Panel Mod script discussion/help

Reply #3864
2Falstaf

You recommend clear the WSH panel properties after upgrade your script.
All columns defined by me  are lost for me and I must re-create them.
It is possible add import/export columns definition?


WSH Panel Mod script discussion/help

Reply #3866
marc2003: I click like a maniac but can't reproduce it with that either... Although I found it a bit random when it crashed before... I'll let you know if it crashes again

And regarding the grouping idea. I know I can disable some groups, but then there are artists where for instance live albums are essential and so you'd want them shown. Of course a minor thing, but yeah I think it would be a nice feature.

Is the album art downloader link in the now playing script supposed to have any preference for download folder? At first I thought it did but had problem to update correctly, but it seems it wants to save to the same folder it saved to the time before?
Don't know if it's the standard, but I think it's nicer to save as folder.jpg in the same folder as the tracks, is it possible to get that through a wsh_panel? My foo_run script looks like this:
"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" /ar "%artist%" /al "%album%" /p "$replace(%path%,%filename_ext%,)folder.jpg"

 

WSH Panel Mod script discussion/help

Reply #3867
yeah, i probably should have done that before. i'll add a dialog where you can set your own custom parameters - i don't want to fix a path/filename that all people aren't going to happy with. for instance, i use cover.jpg because i don't trust those evil bastards* at microsoft not to overwrite my lovely images.


*i do like their products for the most part. it's just WMP that is the spawn of satan.

WSH Panel Mod script discussion/help

Reply #3868
yeah, i probably should have done that before. i'll add a dialog where you can set your own custom parameters - i don't want to fix a path/filename that all people aren't going to happy with. for instance, i use cover.jpg because i don't trust those evil bastards* at microsoft not to overwrite my lovely images.


*i do like their products for the most part. it's just WMP that is the spawn of satan.


Ok, nice. Yeah I prefer foobar2000 and mpc-hc too.

The musicbrainz panel crashed again just now with the same message. Hm, the only thing I can say more is that I use facets to browse, and it's when I click thorugh the list in a certain tempo that it happens. Maybe it's some millisecond when it searches that it doesn't want to be disturbed?

WSH Panel Mod script discussion/help

Reply #3869
this crash happened with the test version? you did copy the file when foobar was closed or at least reloaded the panel?

edit: i've just thought of something else to try. re-download that same file and try it....

https://dl.dropboxusercontent.com/u/2280132...temp/common8.js

WSH Panel Mod script discussion/help

Reply #3870
Alright, yes I had restarted the program. I'll report back if it crashes again with this new version.

WSH Panel Mod script discussion/help

Reply #3871
@falstaff, i've found a bad example of code in your WSHplaylist.js file on line 324. it seems you're creating a new font object inside a function called from on_paint which is bad edit: not recommended according to the panel notes. what makes this worse is that this is inside a loop.

Code: [Select]
gr.GdiDrawText(tf2, gdi.Font(g_fname, g_fsize - 1, g_fstyle), blendColors(this.text_colour, RGB(0,0,0), 0.25), cx, tf2_y, cw, tf2_h, p.headerBar.columns[j].DT_align | DT_CALCRECT | DT_TOP | DT_END_ELLIPSIS | DT_NOPREFIX);


WSH Panel Mod script discussion/help

Reply #3872
Falstaff,

I'm getting an easily reproducible crash in CoverFlow with latest WSH mod from marc2003. Right clicking on the panel throws out error message below.

Code: [Select]
WSH Panel Mod (CoverFlow View v1.4.3 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Invalid procedure call or argument
File: <main>
Line: 3578, Col: 5
<source text only available at compile time>

WSH Panel Mod script discussion/help

Reply #3873
if it only happens when right clicking then it will be related to this...

Quote
- CHG: AppendMenuItem no longer accepts MF_POPUP as a flag. You should be using AppendTo instead.


an example of how to update the code can be found in one of my posts from 2011.

http://www.hydrogenaud.io/forums/index.php...mp;#entry775186




WSH Panel Mod script discussion/help

Reply #3874
Except that still causes the same crash.