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

WSH Panel Mod script discussion/help

Reply #1900
1) can't reproduce.

screenshot

the line you reference is completely unrelated so you must be using a slightly outdated version. next time, can you post what code is on the line you mention.

all i can suggest for now is to browse your foobar profile\wsh_lastfm folder in windows explorer and search for and delete all .json files. this will clear all cached files and force a fresh download.

2) i think perhaps you've customised your context menu to hide the playback statistics\rating entries?? you can leave those settings as they are as i can get around that.

http://dl.dropbox.com/u/22801321/samples.zip

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

WSH Panel Mod script discussion/help

Reply #1901
I deleted the .json files and it doesn't crash anymore.

And the rating feature works just fine now with that update.  Thank you!

WSH Panel Mod script discussion/help

Reply #1902
marc2003: the "open image" menu item in your thumbs script has stopped working.

didn't double-click used to open the image too?



thanks for your efforts, i appreciate the work you do and the scripts you share for the foobar2000 community!

WSH Panel Mod script discussion/help

Reply #1903
with my old scripts, a single click used to open the main image. with these updated versions, it now requires a double click. the context menu is working fine for me so it should be working as you expect???

the only instance where double clicking does not work is in grid mode and you have an image overlaid on top of the background thumbnails. because that requires a single click to "close" the image, i've disabled the double click action there.

edit: thinking about it, something may have gone wrong with the file associations on your system. all my script does is launch the full path of the file and it's upto windows to decide what program to use based on the file extension. i'd look into that if i was you.

WSH Panel Mod script discussion/help

Reply #1904
Thanks for the comments. Nothing wrong with file associations. Images open as expected in explorer and elsewhere.

Open containing folder works in the context menu, and I can open images from there.

WSH Panel Mod script discussion/help

Reply #1905
you can browse the marc2003 folder and edit common6.js in a text editor.

on line 798, replace

Code: [Select]
    this.run = function(command) {
        try {
            this.WshShell.Run(command);
        } catch(err) {
        }
    }


with

Code: [Select]
    this.run = function(command) {
            this.WshShell.Run(command);
    }


see what error you get after saving it and reloading the panel. i'd restore the previous function when done testing as well.

WSH Panel Mod script discussion/help

Reply #1906
you can browse the marc2003 folder and edit common6.js in a text editor.

on line 798, replace

Code: [Select]
    this.run = function(command) {
        try {
            this.WshShell.Run(command);
        } catch(err) {
        }
    }


with

Code: [Select]
    this.run = function(command) {
            this.WshShell.Run(command);
    }


see what error you get after saving it and reloading the panel. i'd restore the previous function when done testing as well.


Code: [Select]
Error: WSH Panel Mod (Thumbs by marc2003): The system cannot find the file specified.  File: D:\Apps\No Install\Audio\Players\foobar2000 DUI\marc2003\common6.js
Ln: 799, Col: 13


WSH Panel Mod script discussion/help

Reply #1907
i think i forgot to handle paths with spaces in, try this.

Code: [Select]
    this.run = function(command) {
        try {
            this.WshShell.Run("\"" + command + "\"");
        } catch(err) {
        }
    }


edit:

samples updated with above fix and also a fix for buggy scrolling behaviour in thumbs script.

http://dl.dropbox.com/u/22801321/samples.zip

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

WSH Panel Mod script discussion/help

Reply #1908
Working, thanks for the fix 

WSH Panel Mod script discussion/help

Reply #1909
Hey marc, definitely loving your samples! 
Just have a quick questions, where would I start if I wanted to attach similar artists' pictures next to the names on your panel?  I would ultimately like it to auto download them as well like your nowplaying panel too.

Definitely appreciate any input / help...  I'll do the dirty work, I just wanted to pick your brain.
Thanks!!!

WSH Panel Mod script discussion/help

Reply #1910
i really don't want to encourage hitting last.fm for loads of artists at once. they've already removed documentation from their api for the artist.getimages method. it still works for now but it's not too encouraging for the future.

i'll explain how to access images you have cached already later. i don't have time right now.

samples updated: http://dl.dropbox.com/u/22801321/samples.zip

there is now an Online update feature on the context menu. as my scripts all now use an external file for the main code, it can update this when triggered. you will be prompted to restart foobar2000 when the download is complete.

files changed:
Code: [Select]
marc2003\common6.js
samples\*.txt (added version numbers to all panels)


WSH Panel Mod script discussion/help

Reply #1911
gotcha, thanks Marc, I wasn't aware of that.
I only need the top three similar artists though, so if that's too much of a load I'll try and just have it look in the wsh_lastfm folder.

Thanks again!

WSH Panel Mod script discussion/help

Reply #1912
samples updated: http://dl.dropbox.com/u/22801321/samples.zip

thumbs: bug fix, quite a serious one.  all image related context menu items would not show if no images in folder.

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


if you're using a new version of my scripts (since 5th dec), you can use the Online update feature on the context menu to avoid downloading the full zip.

WSH Panel Mod script discussion/help

Reply #1913
If this doesn't exist already somewhere let me know and I'll write my own, but does anyone have a ContextMenu setup to do playlist rating?

I'm looking for something like this, but the "Library" menu doesn't have it built in:

WSH Panel Mod script discussion/help

Reply #1914
note for users of my playcount sync script: a "fix" i posted in this thread on the 5th december script broke the library import function. use the Online update option on the context menu to fix it.

WSH Panel Mod script discussion/help

Reply #1915
Hey Marc anyway you've got an extra second to start me off for adding pictures to your similar artists code? 
Also to limit the fetch to just 3 artists with their pictures?

Definitely appreciate any help!
Thanks!

WSH Panel Mod script discussion/help

Reply #1916
So does anyone know why the sample scripts MainMenuManager All-In-One.txt and MainMenuManager.txt do not always give you all the menu options?  The "View" file menu especially cuts off at an arbitrary point somewhere in the middle.

WSH Panel Mod script discussion/help

Reply #1917
@morphguy12, make sure you download the latest common6.js to your pc. use Online update on the context menu or extract from the full zip if you don't have that option.

i haven't tested this and also there is quite a major flaw with how i designed my original code for my image scripts. because the artist name source was always your file tags, the case didn't seem important as i thought it was something that isn't going to change. but downloading artist names from last.fm probably isn't going to match your tags 100% of the time.

in your simliar artist panel:

Code: [Select]
images = [];

function on_metadb_changed() {
    if (li.metadb_changed()) {
        //li.metadb returns true or false depending on whether the artist has changed. we don't want to update if the artist hasn't changed.
        images = [];
        files = [];
        for (i = 0; i < Math.min(3, li.items); i++) {
            files[i] = [];
            var folder = p.data_folder + p.eval("$crc32(" + li.names[i] + ")");
            if (p.fso.FolderExists(folder)) files[i] = files[i].concat(utils.Glob(folder + "\\*.jpg").toArray(), utils.Glob(folder + "\\*.jpeg").toArray(), utils.Glob(folder + "\\*.png").toArray(), utils.Glob(folder + "\\*.gif").toArray());
            if (p.fso.FileExists(files[0])) images[i] = gdi.Image(files[0]);
        }
        window.Repaint();
    }
}


then inside the on_paint function, you should have an array called images to use. images[0] being the first, images[1] the second and images[2] the third...

@neothe0ne, never had a problem with the menu not displaying properly.

WSH Panel Mod script discussion/help

Reply #1918
samples updated: use Online update or download the full package. http://db.tt/BInQ3Abm

musicbrainz: bugfix, it never checked for new releases. 

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

 

WSH Panel Mod script discussion/help

Reply #1919
@morphguy12, make sure you download the latest common6.js to your pc. use Online update on the context menu or extract from the full zip if you don't have that option.

i haven't tested this and also there is quite a major flaw with how i designed my original code for my image scripts. because the artist name source was always your file tags, the case didn't seem important as i thought it was something that isn't going to change. but downloading artist names from last.fm probably isn't going to match your tags 100% of the time.

in your simliar artist panel:

Code: [Select]
images = [];

function on_metadb_changed() {
    if (li.metadb_changed()) {
        //li.metadb returns true or false depending on whether the artist has changed. we don't want to update if the artist hasn't changed.
        images = [];
        files = [];
        for (i = 0; i < Math.min(3, li.items); i++) {
            files[i] = [];
            var folder = p.data_folder + p.eval("$crc32(" + li.names[i] + ")");
            if (p.fso.FolderExists(folder)) files[i] = files[i].concat(utils.Glob(folder + "\\*.jpg").toArray(), utils.Glob(folder + "\\*.jpeg").toArray(), utils.Glob(folder + "\\*.png").toArray(), utils.Glob(folder + "\\*.gif").toArray());
            if (p.fso.FileExists(files[0])) images[i] = gdi.Image(files[0]);
        }
        window.Repaint();
    }
}


then inside the on_paint function, you should have an array called images to use. images[0] being the first, images[1] the second and images[2] the third...

@neothe0ne, never had a problem with the menu not displaying properly.


Thanks so much Marc,
Unfortunately I can't get any images to show under paint no matter what kind of code I put in there,

I'll keep trying, but have any suggestions?

Thanks!!

WSH Panel Mod script discussion/help

Reply #1920
i'll try and test something over the next few days. the reason i didn't test before that is because i don't have any art to test with. i'm behind a proxy so i can't use the program i bundle with my script. i'll have to grab a few images manually.

samples updated: use the Online update feature on the context menu or download the full zip here. http://db.tt/BInQ3Abm

last.fm biography: bugfix - last.fm logo button didn't work

WSH Panel Mod script discussion/help

Reply #1921
samples updated: use the Online update feature on the context menu or download the full zip here. http://db.tt/BInQ3Abm

simple seekbar /  nyan cat seekbar: bugfix - tooltip only worked on first hover then stopped working after mouse had left area.

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



WSH Panel Mod script discussion/help

Reply #1922
I'll keep trying, but have any suggestions?


there were loads of errors in that. i tested this one...

http://dl.dropbox.com/u/22801321/morphguy12.txt



the placeholder for artists that don't have images should already be on your system as it's bundled in the zip. obviously this was a quick bodge - you can mess around with placement yourself.

WSH Panel Mod script discussion/help

Reply #1923
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.

WSH Panel Mod script discussion/help

Reply #1924
I want to create a button which runs a command from the Edit menu.
e.g., fb.RunMainMenuCommand("Edit/...");

I found plman.SetActivePlaylistContext(), however, I want to set the active focused playlist to a specific viewer.  (I want it to select my SimPlaylist instead of my ElPlaylist).  Is this possible?