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

WSH Panel Mod script discussion/help

Reply #1950
Thanks marc2003! That's pretty much what I wanted.
There is just one thing I've changed (I can understand code but not write it ). I think because you are showing master releases, there is no need for showing the format of the release, because although it could say "vinil" it shows only the format of the oldest release (and the country of the publisher), not the other ones.
For me this is perfect to see if there are new releases from an artist, the format its not really so much important. Well, if I could see if it's an EP or a complete album it would be great, but I don't know how to do that hehe.

Thanks for your time again

WSH Panel Mod script discussion/help

Reply #1951
Hi everyone. Quick question about WSH Coverflow :

How can I increase the size of the font that displays the %album artist% - %album% information, without going through foobar's prefs > colors and fonts ?
I don't mind hardcoding that size in the script. I just need to know what to type and where to type it. Thank you. 

Optionally, how can I set that same font to bold ? (within the script too).

F.e. :
Code: [Select]
function get_font() {
    if (g_instancetype == 0) {
//        g_font = window.GetFontCUI(FontTypeCUI.items);
        g_font = gdi.Font("Segoe UI", 24, 1); // or any other
        g_font_headers = window.GetFontCUI(FontTypeCUI.labels)
    } else if (g_instancetype == 1) {
        g_font = window.GetFontDUI(FontTypeDUI.playlists);
        g_font_headers = window.GetFontDUI(FontTypeDUI.tabs)
    }
};

WSH Panel Mod script discussion/help

Reply #1952
Thanks onv ! Will try that !

WSH Panel Mod script discussion/help

Reply #1953
I think because you are showing master releases, there is no need for showing the format of the release, because although it could say "vinil" it shows only the format of the oldest release (and the country of the publisher), not the other ones.


makes sense. i've removed it now. use Online update on the context menu to update the script.

edit: the Online update option has now been renamed to Script update. i changed it because some scripts have an Update (as in content) option and they might be confusing when seen together.

WSH Panel Mod script discussion/help

Reply #1954
I have one silly problem - i can't add user picture for genre in the script - now playing with last.fm bio. place help me. tenx.


marc2003 I could deal with problem alone which I have described before, by modifying lines in your "Now Playing with Last.fm Bio" script:

var genre = encodeURIComponent(p.eval("%genre%"));      
b.buttons.but9 = new button(p.w - 540, 560, 544, 166, {normal: genre+".png", hover: "allmusic_h.png"}, function() { p.browser(allmusic); }, allmusic);

but now I have another problem - when genre style of two words like - smooth jazz -> genre image not displayed. Please help me.

WSH Panel Mod script discussion/help

Reply #1955
replace %genre% with $meta(genre,0)

0 is the first value, 1 is the 2nd and so on

http://wiki.hydrogenaudio.org/index.php?ti...a.28name.2Cn.29

also, you probably don't need encodeURIComponent there. you only need that if putting in genre as part of a link to a website.

WSH Panel Mod script discussion/help

Reply #1956
You're the top, thank you very much. Merry Christmas and Happy New Year from me


WSH Panel Mod script discussion/help

Reply #1958
no i meant from my samples.zip download (it contains a folder named marc2003 as per my instruction above). you've already downloaded it because the script in your panel comes with it....

but here's the link incase you need it again... http://db.tt/BInQ3Abm

WSH Panel Mod script discussion/help

Reply #1959
samples updated: use the Update script option on the right click menu or the full download is in the link above.

last.fm - similar artists - top tags - top fans - top albums - top tracks: spotify wouldn't launch due to typos in script. 

files changed:
Code: [Select]
marc2003\common6.js

WSH Panel Mod script discussion/help

Reply #1960
I'm really new when it comes to this but I edited together some scripts I found here and made some buttons. They work great except I can't figure one button out. Ideally, this button would send Last.fm a 'loved track' signal using softplaylists and also rate it 5 stars using playback stats. Is that even possible to do two commands?

I found this over in the softplaylists thread but it isn't working for me, nothing shows up in console when I press it either.

Code: [Select]
fb.RunContextCommand("Last.fm/Last.fm Love '" + fb.TitleFormat("%title%").Eval() + "' By '" + fb.TitleFormat("%artist%").Eval() + "'");

Here's the full code I'm using.
http://pastebin.com/wwVwcCmA

Here's what it looks like. (Buttons on the right)
http://i.imgur.com/2Thw3.jpg

Also! Two of the buttons are for switching DSP modes, is it possible to combine them into one? Up state would be my Gapless DSP (like a default) and the Down state would be my Headphone DSP. Maybe I'll save that for another day and see if I can get the Love track to work first.

Thanks you guys! 

WSH Panel Mod script discussion/help

Reply #1961
you typically process mouse click events on up, not down. also, you need quite a few more callbacks in there....

Code: [Select]
metadb = fb.GetFocusItem();

function on_selection_changed() {
    on_item_focus_change();
}

function on_playlist_switch() {
    on_item_focus_change();
}

function on_playback_new_track() {
    on_item_focus_change();
}

function on_item_focus_change() {
    //prefer playing item if playing. use selected item if playback is stopped.
    metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
}


then inside your click function

Code: [Select]
if (!metadb) return;
var artist = fb.TitleFormat("%artist%").EvalWithMetadb(metadb);
var title = fb.TitleFormat("%title%").EvalWithMetadb(metadb);
fb.RunContextCommandWithMetadb("Last.fm Love Track '" + title + "' by '" + artist + "'", metadb);
//more code to run other functions here


you can't check the DSP so it's not really possible to make a proper toggable button. you could try and bodge something by storing the state manually (see window.GetProperty and window.SetProperty) but this wouldn't update if that setting was changed via the menu/preferences.

WSH Panel Mod script discussion/help

Reply #1962
Thanks Marc, you're a lifesaver! Works great. I'll probably be back when I inevitably have more trouble.

Edit: Too bad about the toggle, not really a big deal though. I'll keep it as two buttons.

WSH Panel Mod script discussion/help

Reply #1963
Thanks once again Marc, I've got it up and running again. The thumbs script seems to show the thumbs without any space between them, and sometimes they overlap. Any idea how to fix this? I tried the "simple image viewer" script - this looks good, but it won't seem to show all the art in the directory at the same time - only one image at a time.

Thanks

WSH Panel Mod script discussion/help

Reply #1964
the images do not overlap. they're just cropped to be square.

WSH Panel Mod script discussion/help

Reply #1965
samples updated: http://db.tt/BInQ3Abm

new script: now playing with track list



you can hack around around and change the title formatting on lines 137-140.

files added/changed:
Code: [Select]
marc2003\common6.js
samples\now playing with track list.txt


WSH Panel Mod script discussion/help

Reply #1966
things it can't do-
everything else


from playcount, appears to be your album of the year - admit it though, you're just hot for Natasha

here's to a foobar rich 2013

WSH Panel Mod script discussion/help

Reply #1967
Marc2003 you thought of making lyrics in wsh panel?

WSH Panel Mod script discussion/help

Reply #1968
Oh yes, a simple lyrics panel in the look of your other panels (bigger and underlined font at the top) would be really great, Marc.

Perhaps something like this:


WSH Panel Mod script discussion/help

Reply #1969
Marc2003 you thought of making lyrics in wsh panel?


nope. i have no interest in lyrics at all.

also, falstaff has already created a lyrics panel. search the thread - it's in here somewhere.

WSH Panel Mod script discussion/help

Reply #1970
Hey marc, is there any easy way to remove the cover art and playback buttons from the now playing script (the regular one, not the one with bio or track list) so I can display the artwork in a separate panel and give more room for the artist name and track titles?

I tried editing some of the code myself but couldn't quite figure it out.

 

WSH Panel Mod script discussion/help

Reply #1971
samples updated: http://db.tt/BInQ3Abm

new script: ok, so i changed my mind and made a simple tag reader. displays mutli-line tags in panel. looks a bit like Bollerkopp's screenshot above.



files changed/added:
Code: [Select]
marc2003\common6.js
samples\simple tag reader.txt


tip: you can edit my now playing with last.fm bio panel to replace the bio with the tag display simply by editing the code on line 12

change this...

Code: [Select]
var p = new panel("Now Playing with Last.fm Bio", ["lastfm_bio", "remap", "cd", "images"]);


to

Code: [Select]
var p = new panel("Now Playing", ["simple_tag", "remap", "cd", "images"]);


@Reith. http://dl.dropbox.com/u/22801321/now%20playing%20mod.txt

WSH Panel Mod script discussion/help

Reply #1972
Hey marc2003,

wow... that is really great. Thank you very much for this tag reader script. And for your general work here of course.

WSH Panel Mod script discussion/help

Reply #1973
Thanks, it works great.

WSH Panel Mod script discussion/help

Reply #1974
samples updated: http://db.tt/BInQ3Abm

bugfix: addition of simple tag reader script yesterday caused my simple text reader script to break. 
new: simple text reader now has a customisable title like the tag reader.
misc: now playing with tracklist. code tidyup.

files changed:
Code: [Select]
marc2003\common6.js
samples\now playing with tracklist.txt
samples\simple tag reader.txt
samples\simple text reader.txt


you can check the latest versions of all scripts here: http://dl.dropbox.com/u/22801321/wsh/versions.txt