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

WSH Panel Mod script discussion/help

Reply #2725
Do you guys know if there's a simple script that display the current playing track with a scrolling effect?
I mean an horizontal scrolling, as if it was on a toolbar.


Edit: doesn't matter, i managed to find one
PS: don't know why but i couldn't edit my previous message, probably it was because i wrote it some hours ago...

WSH Panel Mod script discussion/help

Reply #2726
my script only displays masters. if i configure it to show releases, it shows too many duplicates when looking at popular artists and you can get thousands of results.

i see. thank you anyways. seems that most of artist in my library doesnt have masters ))

now tried all your scripts and found useful most of them - let me ask some more questions:
is it possible to make "album - artist" string in album charts? some of artist have very long name so no album visible


and how to change background in panels so it will match splitter color


thank you for efforts once again!

WSH Panel Mod script discussion/help

Reply #2727
i see. thank you anyways. seems that most of artist in my library doesnt have masters ))


you should try musicbrainz instead. i've always preferred it over discogs.

Quote
is it possible to make "album - artist" string in album charts?


yup, it's done. right click your panel>Update script and restart foobar when prompted.

Quote
and how to change background in panels so it will match splitter color


open the editor and edit line 12...

Code: [Select]
var p = new panel("Last.fm Album Info", ["metadb", "lastfm_album"]);


add "custom_background" like this...

Code: [Select]
var p = new panel("Last.fm Album Info", ["metadb", "lastfm_album", "custom_background"]);


this trick works for most panels. i didn't include it by default because i assumed most people would be happy with the default. that changes whenever you change your colours through the main foobar display preferences.

full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt

WSH Panel Mod script discussion/help

Reply #2728
another update 

Code: [Select]
7.2013-10-30.04

"Now playing" & "Thumbs". Added "download size" options. For some people,
using original images might be overkill so now there are options for
small (250px) and medium (500px) images. The default is still "Original".


existing users can right click>Update script. full download links in post above.

WSH Panel Mod script discussion/help

Reply #2729
thank you very much! now i have background in all panels i needed.

last question - is it possible to ajust font size and row height in lastfm charts?
and feature request - display lastfm biography if "nothing found" in lastfm album info panel (would be great for rare albums which have not any info to see at least artist info rather than "nothing found")

thanks!

WSH Panel Mod script discussion/help

Reply #2730
last question - is it possible to ajust font size and row height in lastfm charts?


first right click panel>Update script. afterwards, you can hold shift>right click panel>properties and edit the value of list_font_size. the row heights are still the same so you can't go too mad with the values.

Quote
and feature request - display lastfm biography if "nothing found" in lastfm album info panel (would be great for rare albums which have not any info to see at least artist info rather than "nothing found")


i'm not doing that. it's too much hassle. you can always use tabs to switch between the 2 panels.

WSH Panel Mod script discussion/help

Reply #2731
samples updated

i renamed item details to properties.

i've also updated it so that all displayed values are clickable to create autoplaylists. this tooltip should illustrate it...



it works on all tech fields as well.

existing users, right click>Update script.
optionally, the script in the panel can be re-imported to show the new name but it's not required for the new functionality.

full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt

WSH Panel Mod script discussion/help

Reply #2732
I followed you introduction and just simply added a WSH Panel Mod to my layout. The console shows that
Quote
Last.fm Playcount Sync: Use the right click menu to set your Last.fm username.


But I cannot find a menu to right click on my foobar.

Just want to know where to input my last.fm username and password.

Thanks very much.

WSH Panel Mod script discussion/help

Reply #2733
in the panel, you should see an exclamation mark button. right click on that.

WSH Panel Mod script discussion/help

Reply #2734
please give me a hint how change column size for names and bars in lastFM chart
and row height if possible
thanks

PS would be very appreciate if there any way to do like this

WSH Panel Mod script discussion/help

Reply #2735
Marc is possible to edit this part to download image also from google?
From this page: https://www.google.com/search?q=michelle+br...348&bih=647

It would be good to have 2 servers in one script..


Code: [Select]
this.download = function() {
        if (p.artist == "" || p.artist == "?") return;
        this.working = true;
        var folder = this.folder + "\\";
        if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        this.xmlhttp.open("GET", "http://www.last.fm/music/" + encodeURIComponent(p.artist) + "/+images", true);
        this.xmlhttp.send();
        this.xmlhttp.onreadystatechange = function() {
            if (im.xmlhttp.readyState == 4) {
                if (im.xmlhttp.status == 200) {
                    var text = im.xmlhttp.responsetext;
                    if (!im.doc) im.doc = new ActiveXObject("htmlfile");
                    im.doc.open();
                    var div = im.doc.createElement("div");
                    div.innerHTML = text;
                    var data = div.getElementsByTagName("img");
                    var urls = [];
                    for (i = 0; i < data.length; i++) {
                        if (data[i].src.indexOf("http://userserve-ak.last.fm/serve/126s") == 0) urls.push(data[i].src.replace("126s", size == "low" ? "252" : size == "medium" ? "500" : size == "high" ? "_" : "_"));
                    }
                    for (i = 0; i < Math.min(urls.length, im.limit, 50); i++) {
                    p.WshShell.Run("cscript //nologo \"" + p.script_path + "download.vbs\" \"" + urls[i] + "\" \"" + [folder + i] + urls[i].substring(urls[i].lastIndexOf("/")+1) + "\"" , 0, true);
                    }
                    im.working = false;
                    im.doc.close();
                    im.update();
                    window.NotifyOthers("images", "update");
                } else {
                    p.console("HTTP error: " + im.xmlhttp.status);
                }
            }
        }
    }

WSH Panel Mod script discussion/help

Reply #2736
pick apart google.boo from album art downloader and integrate it yourself.

WSH Panel Mod script discussion/help

Reply #2737
Is there any way to parse URLs in a text file on the simple text reader script? Or even style the text in some way?

WSH Panel Mod script discussion/help

Reply #2738
marc i'm quite sure that some days ago i saw, in some of your scripr like the musicbrainz and lastfm similar artists, the option to change the font of the list.
i tried again today but i can't find it anymore, am i blind or i was drunk before?


WSH Panel Mod script discussion/help

Reply #2740
Marc i'm trying to get this to work with Google, but i don't know exactly what to write?
Can you help me, please?  When you have time..

I get: HTTP error: 0.



Code: [Select]
this.download = function() {
        if (p.artist == "" || p.artist == "?") return;
        this.working = true;
        var folder = this.folder + "\\";
        if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        this.xmlhttp.open("GET", "http://images.google.com/images?gbv=1&q=" + encodeURIComponent(p.artist), true);
        this.xmlhttp.send();
        this.xmlhttp.onreadystatechange = function() {
            if (im.xmlhttp.readyState == 4) {
                if (im.xmlhttp.status == 200) {
                    var text = im.xmlhttp.responsetext;
                    if (!im.doc) im.doc = new ActiveXObject("htmlfile");
                    im.doc.open();
                    var div = im.doc.createElement("div");
                    div.innerHTML = text;
                    var data = div.getElementsByTagName("img");
                    var urls = [];
                    for (i = 0; i < data.length; i++) {
                        if (data[i].src.indexOf("https://encrypted-tbn3.gstatic.com/images?q=tbn:") == 0);
                    }
                    for (i = 0; i < Math.min(urls.length, im.limit, 10); i++) {
                    p.WshShell.Run("cscript //nologo \"" + p.script_path + "download.vbs\" \"" + urls[i] + "\" \"" + [folder + i] + urls[i].substring(urls[i].lastIndexOf(":")+1) + "" , 0, true);
                    }
                    im.working = false;
                    im.doc.close();
                    im.update();
                    window.NotifyOthers("images", "update");
                } else {
                    p.console("HTTP error: " + im.xmlhttp.status);
                }
            }
        }
    }

WSH Panel Mod script discussion/help

Reply #2741
Is there any way to make buttons that change output device? I have my stereo hooked to SPDIF out, and also use my PC Speakers when someone is watching TV.  I have the buttons made, but can't figure out what command to use to change devices.  I tried fb.runmainmenucommand, thinking that you can make a keyboard shortcut to accomplish this task, but evidently I'm not wording something right.  Any help would be appreciated.

WSH Panel Mod script discussion/help

Reply #2742
if you want a keyboard shortcut, just configure it under file>preferences>keyboard shortcuts.

or if you want to make a button in your script, just type out the command as it appears in the main menu. you can hold down shift and then click the Playback menu to see all items.

Code: [Select]
fb.RunMainMenuCommand("Playback/Device/BLAH");

WSH Panel Mod script discussion/help

Reply #2743
marc i'm quite sure that some days ago i saw, in some of your scripr like the musicbrainz and lastfm similar artists, the option to change the font of the list.
i tried again today but i can't find it anymore, am i blind or i was drunk before?


edit: don't know if it is because of an update or for some other reason but the option seems to be back again, thank you marc.

a question about the "rights" of your scrips:
i have a friend that gave me his .fth file to adjust his skin. it uses lots of your scripts but some of them are a little bit modified (removed lastfm buttons, some layouts changed, stuff like that).
Once finished he'd like to post it on deviantart, can this be done or have he to use your script 100% as they are?
Also...when there is an update ... the customization of a script will be lost?

WSH Panel Mod script discussion/help

Reply #2744
is it possible to skip playing album (play nex one in queue) by button or shortcut?

WSH Panel Mod script discussion/help

Reply #2745
@marc(or someone else who can help)

In the artreader and info scripts, how do I get an image to show rather than the "No Image" and "Nothing found" text?

Thanks


WSH Panel Mod script discussion/help

Reply #2746
@marc(or someone else who can help)

In the artreader and info scripts, how do I get an image to show rather than the "No Image" and "Nothing found" text?

Thanks


In artreader you can set image in foobar preferences>display>stub image path..
For info script don't now, you must modify that script...

WSH Panel Mod script discussion/help

Reply #2747
@marc(or someone else who can help)

In the artreader and info scripts, how do I get an image to show rather than the "No Image" and "Nothing found" text?

Thanks


In artreader you can set image in foobar preferences>display>stub image path..
For info script don't now, you must modify that script...


Thanks

WSH Panel Mod script discussion/help

Reply #2748
@foomark, i'm past caring what people do with these scripts. i've lost count of the times people have modified them so they don't even work properly and then post them on DA. 

WSH Panel Mod script discussion/help

Reply #2749
Marc , i made your script to work with Google.
The problem is how to define the size of the pictures? If you can help me with this?
I think you should also include this in your script?

Code: [Select]
this.download = function() {
        if (p.artist == "" || p.artist == "?") return;
        this.working = true;
        var folder = this.folder + "\\";
        if (!this.xmlhttp) this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
         this.xmlhttp.open("GET", "https://www.google.com/search?q=" + encodeURIComponent(p.artist) + "/&sei=GAKAUuvmD-WC4gTL9IC4AQ&gbv=2&tbm=isch", true);
        this.xmlhttp.send();
        this.xmlhttp.onreadystatechange = function() {
            if (im.xmlhttp.readyState == 4) {
                if (im.xmlhttp.status == 200) {
                    var text = im.xmlhttp.responsetext;
                    if (!im.doc) im.doc = new ActiveXObject("htmlfile");
                    im.doc.open();
                    var div = im.doc.createElement("div");
                    div.innerHTML = text;
                    var data = div.getElementsByTagName("img");
                    var urls = [];
                    for (i = 0; i < data.length; i++) {
                        if (data[i].src.indexOf("https://encrypted-tbn2.gstatic.com/images?q=tbn:") == 0) urls.push(data[i].src.replace(":", ":"));
                    }
                    for (i = 0; i < Math.min(urls.length, im.limit, 50); i++) {
                    p.WshShell.Run("cscript //nologo \"" + p.script_path + "download.vbs\" \"" + urls[i] + "\" \"" + [folder + i] + urls[i].substring(urls[i].lastIndexOf(":")+1) + ".jpg" + "\"" , 0, true);
                    }
                    im.working = false;
                    im.doc.close();
                    im.update();
                    window.NotifyOthers("images", "update");
                } else {
                    p.console("HTTP error: " + im.xmlhttp.status + urls);
                }
            }
        }
    }