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

WSH Panel Mod script discussion/help

Reply #2225
you could argue my scripts loading a shared file into memory for every panel is wasteful when most of the code won't be used. but in the grand scheme of things, it doesn't really matter. for me, it's made my life easier to manage them all as i have over 20 now.

only you can answer the question about improving yours. if they do what you need already then leave them be. i wouldn't lock panel sizes on scripts you share though. some people might find that undesirable.

WSH Panel Mod script discussion/help

Reply #2226
@marc: i was toying around with your now playing script and stumbled upon background > splitter
i don't get the usage point of it...in DUI that is...is this something that's only supposed to be useful for panel stack splitter? if not, what's the point i'm missing?

WSH Panel Mod script discussion/help

Reply #2227
the Background menu is shared between many scripts and the splitter option is mainly useful for button scripts like this....



it's a system colour and it's meant to blend in with the standard look. it will change if you use a 3rd party windows theme.

WSH Panel Mod script discussion/help

Reply #2228
ah, okay, i get it now

once more, thx for all your scripts!


WSH Panel Mod script discussion/help

Reply #2230
I've been using my own modded MNLT2 theme (all I did was change the colors, font and added a filter panel) for several months now, and now the WSH panel with the progress bar starts crashing everytime I start playing a song. I've tried starting from a fresh download of the skin and re-changed the colors/fonts and added the filter bar and it works fine for the duration my computer is on, but when I turn it on the next day and open up foobar, the progress bar just crashes again. I haven't actually started messing with WSH for myself, but does anyone have an idea of what could be causing this? Thanks in advance.

WSH Panel Mod script discussion/help

Reply #2231
do you have any idea how useless your report is? 

checking the foobar console and posting the offending errors/code would be a start.

WSH Panel Mod script discussion/help

Reply #2232
marc2003

I am still enjoying your WSH Vinyl Turntable script; the novelty hasn't worn off . . . mainly because I am a die-hard vinyl freak. It's purring along nicely; It looks like you permanently solved the crashing issue.

If I was a CD freak, I wouldn't be asking you this question . . . however vinyl records are different; they contain more than one label.

If you have ripped a vinyl record, you have ripped two sides and each label is different. Therefore for every track using disc.jpg, there should actually be a choice between disc1.jpg or disc2.jpg representing side1 and side2 of the record.

For all my vinyl rips, I was thinking of modifying the %tracknumber% tag to have multiple values like these examples:

This is 1 vinyl record — it has 4 tracks , 2 are on side1 , 2 are on side2 — here is the %tracknumber% tags:
Quote
01;1
02;1
03;2
04;2
[/size][/font]
This is 2 vinyl records (a 2-LP album) — it has 8 tracks , 2 are on side1 , 2 are on side2 , 2 are on side3 , 2 are on side4 — here is the %tracknumber% tags:
Quote
01;1
02;1
03;2
04;2
05;3
06;3
07;4
08;4
[/size][/font]

As you can see, the second value in the tracknumber tag is a number representing a side of a record.
How can your script be modified to flag this tag value and choose the appropriate image from   disc1.jpg | disc2.jpg | disc3.jpg| ... | disc(n).jpg

Thanks.

WSH Panel Mod script discussion/help

Reply #2233
you shouldn't need to modify the script. this should be set in the main foobar2000 artwork preferences dialog.

Code: [Select]
disc[%discnumber%].jpg

WSH Panel Mod script discussion/help

Reply #2234
marc

I changed foobar200 artwork preferences for disc exactly as you specified.
I set up a test album . . . some tracks were tagged with %discnumber% value 1, some tracks were tagged with %discnumber% value 2.
Your WSH Turntable panel did not refresh to disc2 at any time . . . "play this, stop, play that" actions had no effect; it continued to play disc1 at all times.
Actually previous line is not totally true . . . If I play a track from another album and then go back to the test album and play a track, the panel will refresh.

WSH Panel Mod script discussion/help

Reply #2235
oops, i forgot to mention you'll need to edit what triggers a change. change %album% on line56 to whatever you like. just adding %discnumber% should be sufficient.


WSH Panel Mod script discussion/help

Reply #2236
you are referring to the item here in red I presume?:
Quote
function on_playback_new_track() {
        metadb = fb.GetNowPlaying();
        if (!metadb) return;
        var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
        if (temp_album == album) return;
        album = temp_album;
        img = utils.GetAlbumArtV2(metadb, id);
        if (img) {
                mask();
                calc();
        }
        window.Repaint();
}



Yeah, it worked . . . . thanks +++++++

WSH Panel Mod script discussion/help

Reply #2237
you presume right. i'm not sure why you had to ask.

WSH Panel Mod script discussion/help

Reply #2238
it's more educational for everyone viewing

WSH Panel Mod script discussion/help

Reply #2239
marc
it still has a small problem . . .
if i change to an album containing one disc.jpg and no %discnumber% tag filled, then the default disc image will show (rather than disc.jpg at track location).

*EDIT*

I think I fixed it by changing this item (in red) in the script from this:
Quote
var temp_album = fb.TitleFormat("%discnumber%").EvalWithMetadb(metadb);

to this:
Quote
var temp_album = fb.TitleFormat("$if2(%discnumber%,%album%)").EvalWithMetadb(metadb);

WSH Panel Mod script discussion/help

Reply #2240
you're getting it all mixed up. first of all, i said you should add %discnumber% to the %album% string. with your code, it won't update when switching albums if the %discnumber% remains the same.

Quote
then the default disc image will show (rather than disc.jpg at track location)


this is dictated by what is set in the artwork preferences and what i already gave you should account for that.

Code: [Select]
disc[%discnumber%].jpg

WSH Panel Mod script discussion/help

Reply #2241
now you've got me confused. . .

> i said you should add %discnumber% to the %album% string . . .

please show me the exact code line which is correct in your eyes, thanks.

WSH Panel Mod script discussion/help

Reply #2242
this is what i said.

change %album% on line56 to whatever you like. just adding %discnumber% should be sufficient.


original code on line56:

Code: [Select]
var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);


add %discnumber%

Code: [Select]
var temp_album = fb.TitleFormat("%album%%discnumber%").EvalWithMetadb(metadb);


stop me if i'm going too fast...

WSH Panel Mod script discussion/help

Reply #2243
penny has dropped . . . . thanks ++++++


WSH Panel Mod script discussion/help

Reply #2245
you are referring to the item here in red I presume?:
Quote
[!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]function on_playback_new_track() {
        metadb = fb.GetNowPlaying();
        if (!metadb) return;
        var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
        if (temp_album == album) return;
        album = temp_album;
        img = utils.GetAlbumArtV2(metadb, id);
        if (img) {
                mask();
                calc();
        }
        window.Repaint();
}[/size]
[/color]


Yeah, it worked . . . . thanks +++++++

just FYI, no need to grab the metadb of the playing item in this function, because you have it in input argument, so simply add it in args and remove the first line :

Quote
[!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]function on_playback_new_track(metadb) {
        metadb = fb.GetNowPlaying();
        if (!metadb) return;
        var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
        if (temp_album == album) return;
        album = temp_album;
        img = utils.GetAlbumArtV2(metadb, id);
        if (img) {
                mask();
                calc();
        }
        window.Repaint();
}[/size]
[/color]



[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]EDIT: typo[/size]

WSH Panel Mod script discussion/help

Reply #2246
given the absolutely horrible performance of this script on album change, i don't think this change will make much difference. but thanks anyway.

WSH Panel Mod script discussion/help

Reply #2247
i suppose i should have put discnumber in the original script but because all my multi-disc CD rips have the same art, i didn't think to do that. i've updated it now:

script: https://dl.dropbox.com/u/22801321/2013/march/turntable.txt
turntable image: https://dl.dropbox.com/u/22801321/2013/march/turntable.jpg

does this do something? i haven't followed previous discussion about it but just pasted in a WSH panel Mod with image set in the right folder, nothing happens on new track playing ... ?

asking to quickly, id set to 2 = cd image, i've none  better with id = 0 for me...

WSH Panel Mod script discussion/help

Reply #2248
Falstaff
marc2003 forgot to share one more image . . . default disc when no 'disc.jpg' exists for the album, giving the effect of an empty spinning turntable platter:

empty platter image (click to see/copy full size):        

WSH Panel Mod script discussion/help

Reply #2249
samples updated: https://dl.dropbox.com/u/22801321/samples.zip

new script: small web links

description from the full changelog: https://dl.dropbox.com/u/22801321/wsh/changelog.txt

Code: [Select]
08.04.2013.01

NEW: "Small Web Links"

     Unlike my old "Web Links" which generates 5 buttons
     based on track metadata, this new script uses the same
     backend as my "Musicbrainz" script to fetch real links.
     Unlike my "Musicbrainz" script which displayed a list
     of wesbites, this displays a more compact row of
     buttons. The most common wesbites have familiar logos.
     For ones that don't, you'll see a tooltip
     when hovering your mouse. If already using the "Musicbrainz"
     script in "links" mode, it should be removed (or kept in
     "releases" mode). Lastly, it can take a second or two
     for buttons to appear on artists that haven't been played
     before due to background web requests that have to be made.



edit2: rewrote changelog.