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

WSH Panel Mod script discussion/help

Reply #3500
@marc2003 : thank you !
I just wonder if some mod could update the first post of this topic with that info. Otherwise in a few pages somebody else will be asking for the same thing.

WSH Panel Mod script discussion/help

Reply #3501
BTW marc2003, I have some questions / requests about your excellent WSH panel "last.fm and wikipedia biography" :

1. How can we change the automatic download folder for the artists artwork ?
Right now downloads happen in C:\Program Files\foobar2000\wsh_lastfm and in C:\Program Files\foobar2000\wsh_data. I would like to change the drive and folders.

2. How can we set artist names for the download folders instead of cryptic names ?
Right now the folder names are cryptic (ex : wsh_lastfm\1237925370 when I would prefer wsh_lastfm\Ed Sheeran)
I'd like the folders to be named according to the "Artist field remapping" titleformat script.

3. At the moment I am using both your panel and the old foo_uie_biography component which seems to be no longer updated (I have version 4.2.4).
I'd like to get rid of foo_uie_biography. However, SOMETIMES foo_uie_biography happens to find nice artwork when your WSH panel doesn't.
Which is weird because my foo_uie_biography seems to be configured with the same sources as your WSH panel (last.fm and wikipedia).
[blockquote]Here are some examples :
- Mark Ronson : your WSH panel finds a nice bio (foo_uie_biography doesn't). However your WSH panel doesn't find any picture while foo_uie_biography finds a nice related picture (Bruno Mars and a group of dancers in the street).
- Usher : both panels find a bio. However your WSH panel doesn't seem to find any picture of Usher (really ?!) while foo_uie_biography finds a nice portrait of Usher.
- Nick Jonas : in this case your WSH panel finds a bio but no pictures, which is weird since Nick Jonas is one of the trendy artists right now. It could be that there's simply no picture, but that would be surprising.
[/blockquote]Could you manage to understand how foo_uie_biography finds its artwork, and then add that same functionality to your WSH panel ? In that case I would be happy to throw away foo_uie_biography. 

4. I have also noticed that when both (your WSH panel and foo_uie_biography) manage to find the same artwork, the artwork found by foo_uie_biography always happens to be the last of the 5 thumbnails that your WSH panel can display. But it also often happens to be the nicest one (dunno why, I've just noticed it over a lot of played songs). So could we configure your WSH panel to show by default the last of the 5 thumbnails instead of showing the first ?

Many thanks in advance for your help.

WSH Panel Mod script discussion/help

Reply #3502
even though i linked to my website in the previous post, you've somehow managed to download some out of date scripts (which have never been linked to from my site).

the current version does use proper artist names inside a folder which is now named wsh_data, not wsh_lastfm.

i'd delete the old wsh_lastfm and marc2003 folders and start again with my new scripts:

https://dl.dropboxusercontent.com/u/2280132...sh/samples8.zip

for custom folder placement, you'll find this (or similar) as the first line of code in all of my panels.

Code: [Select]
var p = new panel("Thumbs", ["metadb", "remap", "custom_background"]);


insert a new line straight after it:

Code: [Select]
p.data_folder = "e:\\path\\to\\wsh_data\\";


note the double backslashes used to separate folders and the trailing backslashes at the end. also, you must make sure this folder exists before editing the script.

question 3:
what images you get depend entirely on what images appear first on the corresponding artist page. they can change order all the time because they are ranked by last.fm users who can vote on them. if you were to use my script right now with no existing images, the 5 you get will be the first 5 from here:

http://www.last.fm/music/Mark+Ronson/+images

if you're seeing different images from foo_uie_biography, you must have ran it an earlier time when that image was "top". that's because it can only download 1 image.

i tested usher and nick jonas and both are found by my script right now. perhaps there were temporary last.fm problems when you tried earlier??

sorry but i couldn't care less where foo_uie_biography saves its images. now my folders are named properly, you can easily populate the folders yourself if you find them.

question 4:
there is a reason for this. images are downloaded in order from most popular to 5th but my script actually reverse sorts by file modification time - so the last (or newest) image gets displayed first. i'll consider adding other sorting options.

WSH Panel Mod script discussion/help

Reply #3503
Questions 1, 2 & 3 :

  Sorry, I don't know how it happened, since I downloaded everything from your site. I must have messed up with something. Anyway, I've erased stuff and started all over.
I have the latest version of your marc2003 folder.
I have version 1.4 of both panels (biography and thumbs), side to side.
I have inserted in both scripts the relevant code line : p.data_folder = "X:\\PRIVATE\\marc2003\\";
So everything should work, right ? Well...

The Thumbs panel v1.4 works as expected with Mark Ronson, Nick Jonas and Usher now : it was an error in the "Artist field remapping" on my side, sorry.
It does save the artwork automatically in the X:\PRIVATE\marc2003 folder.
However, the artwork folder names are still cryptic : 207265983, 2660058763 and so on.
Those are freshly created folders : the marc2003 folder was empty before my tests.

The bio panel v1.4 crashes if there's not a wsh_data folder inside my foobar2000 folder
Once that wsh_data folder is created, the script creates an "artists" subfolder (which seems unnecessary to me BTW) and creates sub-subfolders named after the artists (non-cryptic).
So it doesn't seem to take into account the p.data_folder = "X:\\PRIVATE\\marc2003\\"; code line. Which is weird since the Thumbs panel takes it into account.
And the sub-subfolders are completely empty, so I don't see any bio info being saved nowhere (it's not saved in X:\PRIVATE\marc2003 either, I have checked).
BTW the script also creates two more folders inside my foobar2000 folder : wsh_lastfm and wsh_settings. Both folders are completely empty. 

FYI, as proof here's the beginning of both scripts :
Code: [Select]
// ==PREPROCESSOR==
// @import "%fb2k_profile_path%marc2003\common8.js"
// @name "Last.fm & Wikipedia Biography"
// @author "marc2003"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==

var p = new panel("Last.fm & Wikipedia Biography", ["metadb", "remap"]);
p.data_folder = "X:\\PRIVATE\\marc2003\\";
var t = new text("lastfm_wiki", 6, 30, p.w - 12, p.h - 30);
p.item_focus_change();
Code: [Select]
// ==PREPROCESSOR==
// @import "%fb2k_profile_path%marc2003\common7.js"
// @name "Thumbs"
// @author "marc2003"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==

var p = new panel("Thumbs", ["custom_background", "remap", "metadb"]);
p.data_folder = "X:\\PRIVATE\\marc2003\\";
var im = new images(0, 0, 0, 0);
var th = new thumbs();
Weird fact : Thumbs seems to use common7.js which is not a part of your last marc2003 folder (I had to copy it from your old marc2003 folder). Maybe it's a bug ? Should I change the code to common8.js and get rid of common7.js ?

Question 4 :

Yes, please add some sorting options and it will be perfect. Thank you.

Question 5 (new - sorry) :

Your bio panel doesn't seem to find any bio (last.fm or wikipedia) for Noah Guthrie when it's present on last.fm ( http://www.last.fm/music/Noah+Guthrie ). 
Here's a screen cap to prove it : http://i59.tinypic.com/10wt9g9.jpg

WSH Panel Mod script discussion/help

Reply #3504
Quote
Weird fact : Thumbs seems to use common7.js which is not a part of your last marc2003 folder (I had to copy it from your old marc2003 folder). Maybe it's a bug ? Should I change the code to common8.js and get rid of common7.js ?


you didn't update the script in your panel with the thumbs.txt file from the samples8.zip i linked you to. the code in the script is quite different so you can't just modify the import bit at at the top.

WSH Panel Mod script discussion/help

Reply #3505
I did, I swear I did. This is really weird. 
Please don't think I'm stupid : I'm not ! I don't know what happened. I really updated it. [EDIT - I had a foobar crash, so maybe my update wasn't saved - I don't see any other explanation]
I'll update it ONCE AGAIN and see what happens.
BTW, it's unusual that your latest version (which uses common8.js) is still numbered 1.4 like the previous version (which used common7.js).

Anyway, I guess this won't solve my other questions, so I hope you can answer them.
BTW I was editing my post while you were writing your answer, so please check it out again : many questions remain. Thank you.

WSH Panel Mod script discussion/help

Reply #3506
using any of my common7 scripts will create empty wsh_lastfm and wsh_settings folders. this gets automatically done by the very first line of code and nothing can be done to prevent it without hacking the main .js file inside the marc2003 folder.

updating scripts in all panels to versions that use common8.js will only create folders if they are required and modifying the paths like i instructed will prevent them being created in your foobar profile folder (or foobar program folder if using portable mode)

as for Noah Guthrie, a bio is found for me??



but for future reference, it is worth noting that not all artists on last.fm will show a bio in my script. although the original source is last.fm/wikipedia, i'm actually using a web service provided by theechonest.com and they don't store bios for all artists. if it's too obscure, it probably won't be on there.

WSH Panel Mod script discussion/help

Reply #3507
OK, I have updated stuff once again, triple-checked. Here's what happens :

Now both panels (bio and thumbs) behave consistently... which means that NONE OF THEM cares about my p.data_folder = "X:\\PRIVATE\\marc2003\\"; code line (yes, I have inserted it again at the right place and in both panels).
The thumbs panel now writes the images inside the foobar2000\wsh_data\artists folder.
The bio panel doesn't write data anywhere.
In fact the bio panel doesn't even work anymore. Don't ask me why. It doesn't display any bio anymore. Nothing.

WSH Panel Mod script discussion/help

Reply #3508
using any of my common7 scripts will create empty wsh_lastfm and wsh_settings folders. this gets automatically done by the very first line of code and nothing can be done to prevent it without hacking the main .js file inside the marc2003 folder.

updating scripts in all panels to versions that use common8.js will only create folders if they are required and modifying the paths like i instructed will prevent them being created in your foobar profile folder (or foobar program folder if using portable mode)

as for Noah Guthrie, a bio is found for me??



but for future reference, it is worth noting that not all artists on last.fm will show a bio in my script. although the original source is last.fm/wikipedia, i'm actually using a web service provided by theechonest.com and they don't store bios for all artists. if it's too obscure, it probably won't be on there.

Quote
BTW, it's unusual that your latest version (which uses common8.js) is still numbered 1.4


that's a component specific thing. it's not anything i have control over. it means component version 1.4 (or above). i'm currently using 1.5.6 and my scripts will work with anything 1.5.0 or above.

WSH Panel Mod script discussion/help

Reply #3509
OK, I have exited foobar, emptied wsh_data, restarted foobar again.
Now the bio panel works again. 
It even writes data (lastm_wiki.json).
But both panels still write data to the local wsh_data folder.
They create an unneeded "artists" subfolder, then properly named sub-subfolders, and inside each sub-subfolder we can find both the bio data and the pictures.
So I don't know why, but it looks like the p.data_folder = "X:\\PRIVATE\\marc2003\\"; code line isn't working in both panels.
For the record, the X:\PRIVATE\marc2003 folder exists of course.

As for the Noah Guthrie bio, it definitely doesn't work but that's OK. I understand what you said about the web service provided by theechonest.com and the "if it's too obscure, it probably won't be on there".

WSH Panel Mod script discussion/help

Reply #3510
ah sorry, i just realised i missed something important out...

Code: [Select]
p.data_folder = "X:\\PRIVATE\\marc2003\\";
p.artists_folder = p.data_folder + "artists\\";


now it should work.

As for the Noah Guthrie bio, it definitely doesn't work but that's OK. I understand what you said about the web service provided by theechonest.com and the "if it's too obscure, it probably won't be on there".


can you not see my screenshot? it's right there in my post.

direct link: https://dl.dropboxusercontent.com/u/2280132...ecember/bio.png

edit: because we've been messing about with different folder locations, it's worth clearing the cache in internet explorer. that should hopefully get things back to normal.

WSH Panel Mod script discussion/help

Reply #3511
We're slowly getting there. I really thought I was going crazy ! 

OK, so now both panels FINALLY write data to the correct X: location.
Everything seems to work as expected...
... except that for some reason, some bios that did show up previously (ex : Lorde and Pearl Jam) don't show up anymore, be it with last.fm or with wikipedia.
I take Lorde and Pearl Jam as an example because obviously a bio of them can be found everywhere, so it's not normal.
Those bios did show up previously so maybe it's some obscure caching problem ? Maybe the script is still trying to find them in the wsh_data folder (that I've erased of course) ?
I tried restarting foobar, with no results. Any clues ?

One last thing : in the latest version of the Thumbs panel, now the thumbnails are placed OVER the main image, when in the previous version it wasn't the case (the main image could be displayed completely).
This leads to some pretty ugly stuff, like this cut face : http://i59.tinypic.com/v8mmmf.jpg
I thought it was a settings problem, but apparently I haven't found the right setting.
Is there a way that I could get back to the previous behaviour ?

WSH Panel Mod script discussion/help

Reply #3512
Quote
except that for some reason, some bios that did show up previously (ex : Lorde and Pearl Jam) don't show up anymore, be it with last.fm or with wikipedia.


as i mentioned in my previous post edit, clearing the cache (temporary files) in internet explorer should sort this out. even if you don't use it, the script uses it in the background.

i'll post an update in a minute to get the old behaviour back - this will only affect images in "centre" mode like you appear to have.

WSH Panel Mod script discussion/help

Reply #3513
Yes, sorry. Our posts are overlapping so I wrote my previous one while you were writing yours.
I have cleared my IE cache (funny thing to me because I never use IE, lol).

I'm happy to report that everything seems to work now !!!  
All bios seem to be back, including Lorde and Pearl Jam... and guess what ? Noah Guthrie is there too !!! 

I am very happy and grateful so far. Thank you for your valuable help. 

Now the only two things I'd need for the Thumbs panel would be :
- The old behaviour in "centre" mode,
- More sorting options

Many thanks in advance !

WSH Panel Mod script discussion/help

Reply #3514
the centre thing has been done. just right click the panel>Update script.

the sorting will take a bit more effort and i'll do that later on.

WSH Panel Mod script discussion/help

Reply #3515
Script updated, old behaviour restored. Everything seems to work so far. This is amazing !!! Thank you so much !!! 
I can live with that, don't worry. Do the sorting thing when you wish. It's pretty much perfect right now.
Yay !!!  (and one more happy WSH user / marc2003 scripts user)

WSH Panel Mod script discussion/help

Reply #3516
Sorting options added. right click panel>Update script.


WSH Panel Mod script discussion/help

Reply #3517
Awesome job !! If only everyone could be so patient and proactive as you !
Many thanks again. This is perfect.
OK, it would be REALLY perfect with one more sorting : Z-A  (no kidding, I would really like that actually)

Just FYI, for SOME artists the "newest first" or "oldest first" doesn't change anything. I guess that must come from last.fm (no time info for the images ?).
I've tried erasing the data folder, clearing IE cache and restarting foobar, but it doesn't help.
But again, it's only for some artists. The sorting works fine for all the others.


WSH Panel Mod script discussion/help

Reply #3518
the time info comes from windows when the file is saved. if your internet is fast enough, they will arrive at the same time. i just did a quick test on 5 fresh images and 4 of them have the same time.

i can't believe you really want Z-A but i'll add it later.

WSH Panel Mod script discussion/help

Reply #3519
I have just realized that the time info comes from Windows. I have downloaded several times the same images and yes, they arrive randomly and/or at the same time.
I was naive to expect the time info to be related to last.fm (most recently published images, etc.), but if it's only download-related then I guess it's no use.

I guess the best sorting would be if we could manually define one default image per artist and that setting would be saved for every artist, but I'm probably asking too much.

WSH Panel Mod script discussion/help

Reply #3520
I guess the best sorting would be if we could manually define one default image per artist and that setting would be saved for every artist, but I'm probably asking too much.


yep. nice idea but i don't really know how i could add such a feature cleanly.

Z-A sorting has been done. right click panel>Update script.

full download: https://dl.dropboxusercontent.com/u/2280132...sh/samples8.zip
script overview / setup guide: http://marc2003.x10host.com/intro

WSH Panel Mod script discussion/help

Reply #3521
i've updated my Thumbs script. it now has a Set as default option on the right click menu. this takes precedence over any sorting options and will make the image always appear first. there is also an option to clear it. it only works in last.fm mode.

the settings will be stored inside your foobar profile folder (wsh_settings\thumbs.ini).

WSH Panel Mod script discussion/help

Reply #3522
Wow marc, this is just beyond awesome. I have no words.     
See ? You are better than you thought yourself a couple posts ago. You have found a way to add that feature in a simple & elegant way (thumbs.ini).

I'm glad I could put you on track for that idea. I wouldn't have thought of it a couple days ago, but our discussions and testing made me finally dream about it...
... and BAM ! You made it happen in less than 24 hours, and it works beautifully.

Big respect man. Double thumbs up !


WSH Panel Mod script discussion/help

Reply #3523
I'm trying to get Marc2003's artreader script (or the columns UI Artwork view panel for that mater, but prefer Marc's) to see artist picture using relative path. I've tried
Code: [Select]
wsh_data\artists\%artist%\*.*
and
Code: [Select]
.\wsh_data\artists\%artist%\*.*
in the display settings artist tab with no results even though I've read here that it should work. Is this possible? Thanks for any help.

WSH Panel Mod script discussion/help

Reply #3524
you have to use an absolute path. i give a couple of examples on this web page...

http://marc2003.x10host.com/thumbs

Code: [Select]
c:\users\marc\appdata\roaming\foobar2000\wsh_data\artists\%artist%\*.*
d:\portable apps\foobar2000\wsh_data\artists\%artist%\*.*