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

WSH Panel Mod script discussion/help

Reply #3275
i've now decided to take samples8 out of beta. i've put up a basic setup guide online. it can be read here. the site needs a lot more work before it's done. 

the download will still be hosted on dropbox but it has a slightly different name

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

This is awesome.Looking forward to some tutorials in editing wsh scripts.
And thanks for all the effort you have put to foobar a more feature full player! 

WSH Panel Mod script discussion/help

Reply #3276
i'm updating the webpage with notes for all scripts today - including screenshots. i'm about half way at the moment.

then tomorrow, i'll have to start on the customisation guide.

WSH Panel Mod script discussion/help

Reply #3277
@samithaj, i've started the customisation guide with a couple of basics but i've not done the bit about merging multiple scripts yet. i'll do that in the next day or 2.

click

WSH Panel Mod script discussion/help

Reply #3278
it's possible to automatic retrieve artist pictures from last.fm in the biography view plugin like the script provided by marc2003 ?
more or less, minus is best

WSH Panel Mod script discussion/help

Reply #3279
i'd recommend ditching the biography component but then i would say that.

but IIRC, it has options to permanently save the files with a path you specify. look around in the server options.


WSH Panel Mod script discussion/help

Reply #3281
it's possible to automatic retrieve artist pictures from last.fm in the biography view plugin like the script provided by marc2003 ?

Yes.



Well...that's the point...i've checked all the options for the plugin...and only found an option to save "manually" artist picture in *.png. for this extension it's valid to accomodate my code into trackinofmod. But i don't see the "automatic" mode.
I'm using a portable installation of foobar2000 in c:// and my database are in shared folder in my other PC-server in my LAN....
thanks!...
more or less, minus is best

WSH Panel Mod script discussion/help

Reply #3282
file>preferences>tools>biography server>artist tab. specify path in the image box and it works automatically??

you can't change the extension because the component saves the file as-is. you'll have to account for this with multiple $if $fileexists statements in your info panel. (or you might look to see if it supports wildcards - i have no idea)

edit: that biography view component is weird. when i play a new artist, it displays the image for the previous one?? if it takes time to download a new one, i'd rather see a blank panel than the wrong image.

WSH Panel Mod script discussion/help

Reply #3283
@samithaj, i've started the customisation guide with a couple of basics but i've not done the bit about merging multiple scripts yet. i'll do that in the next day or 2.

click

Thank you @marc2003  It's really helpful !!

WSH Panel Mod script discussion/help

Reply #3284
@samithaj, i've started the customisation guide with a couple of basics but i've not done the bit about merging multiple scripts yet. i'll do that in the next day or 2.

click

@marc2003
I'm trying use your migrate.txt script to move my old thumbs to the new method. I had over 6GB of folders and files to migrate.
It seemed to work.  But I got the following messages.  I'm trying to understand what they mean. Please help?

Folders without image/txt files deleted: 1147  [I'm assume these are empty folders where last.fm failed to provide an artist photo?]
Folders without image/txt files not deleted due to errors: 0

Folders with image/txt files to keep: 9192

Of those folders to keep, 7425 were matched against artists in your library and moved successfully.
There were 874 errors moving folders for artists in your library.  [What does this mean?  And what should I do now to fix/change this?]

There are 1767 folder(s) remaining that don't match artists in your library.  [What does this mean?  Artists with different names spellings/changes/deleted songs/or what?

Also - What happened to the nowplaying.txt it's not in the samples8 folder? It was my main window, so now after the move I have a big Aw crashed!  I wouldn't have migrated if I'd know it was missing. Is this a mistake or has it been replace by another script?

P.S. I backed up my old folders in case I need to redo this process.
Thanks

 

WSH Panel Mod script discussion/help

Reply #3285
6GB? **** me. foobar must have ground to a halt when you ran that? 

Quote
Folders without image/txt files deleted: 1147 [I'm assume these are empty folders where last.fm failed to provide an artist photo?]


yep.

Quote
Of those folders to keep, 7425 were matched against artists in your library and moved successfully.


this is good!

Quote
There were 874 errors moving folders for artists in your library.


this is not so good. have you tried running it again just to see if the same number fail? i'll post another version in a bit that will give more detailed logging information so i can investigate it.

Quote
There are 1767 folder(s) remaining that don't match artists in your library. [What does this mean? Artists with different names spellings/changes/deleted songs/or what?


all these folders were generated by you playing artists that don't exist in your library. i do have another script that attempts to work around that, i'll post it up in a bit.






WSH Panel Mod script discussion/help

Reply #3286
This is just a heads-up to anyone using marc2003 migrate.txt script to change artists info to the new method.

Some of my other foobar panels stopped showing artist info after the migration.
After much searching, I found that in the Preferences>Display>Album Art
I had a search pattern. C:\Users\....\AppData\Roaming\foobar2000\wsh_lastfm\$crc32(%artist%)\*.*

Since this folder path is no longer used it must be changed to
C:\Users\....\AppData\Roaming\foobar2000\wsh_data\artists\%artist%\*.*

WSH Panel Mod script discussion/help

Reply #3287
there is a note about that on this page.

WSH Panel Mod script discussion/help

Reply #3288
6GB? **** me. foobar must have ground to a halt when you ran that? 

Quote
Folders without image/txt files deleted: 1147 [I'm assume these are empty folders where last.fm failed to provide an artist photo?]


yep.

Quote
Of those folders to keep, 7425 were matched against artists in your library and moved successfully.


this is good!

Quote
There were 874 errors moving folders for artists in your library.


this is not so good. have you tried running it again just to see if the same number fail? i'll post another version in a bit that will give more detailed logging information so i can investigate it.

Quote
There are 1767 folder(s) remaining that don't match artists in your library. [What does this mean? Artists with different names spellings/changes/deleted songs/or what?


all these folders were generated by you playing artists that don't exist in your library. i do have another script that attempts to work around that, i'll post it up in a bit.


@marc2003
Thanks for the quick reply.

Yes, foobar did come to stop while it ran the script :-)

Which brings up a suggestion. When I double-clicked the panel to start it did nothing. It'd be nice if a pop-up (or something) indicating the script had actually started running. I ended up double-clicking 3 or 4 times because I couldn't tell anything had happened. Eventually foobar froze and I guessed it was processing the migration.

Thanks for explaining the errors. I'm still not sure what the "1767 remaining that don't match" means? How can i play files not in my library? My library monitors my entire hard drive for new mp3's. Do you mean, that the CRC coded folder was generated and then the artist name got changed or deleted later?

I'll run it again on the remaining folders and let you know the results. I wasn't sure if you could repeat a migration like that?

UPDATE.
I got the same result.

Folders with image/txt files to keep: 1767

Of those folders to keep, 0 were matched against artists in your library and moved successfully.
There were 874 errors moving folders for artists in your library.

There are 1767 folder(s) remaining that don't match artists in your library.

WSH Panel Mod script discussion/help

Reply #3289
oops, i really do need to protect against people double clicking multiple times. i agree some sort of message would help as well. i'll get on it.

Do you mean, that the CRC coded folder was generated and then the artist name got changed or deleted later?


yup, that's a possibility.


WSH Panel Mod script discussion/help

Reply #3291
Breaking this out so its not lost in migrate.txt thread.

What happened to the nowplaying.txt it's not in the samples8 folder?
It was my main window, so now after the move I have a big Aw crashed! I wouldn't have migrated if I'd know it was missing. Is this a mistake or has it been replace by another script?

WSH Panel Mod script discussion/help

Reply #3292
Folders with image/txt files to keep: 1767
There were 874 errors moving folders for artists in your library.
There are 1767 folder(s) remaining that don't match artists in your library.


ah that's a bug.    of course i should subtract any artists in library errors from the total folders left. you actually have 893 folders that aren't matched to your library.

i'll see what i can do about the now playing script. i really was planning not to support it because it was one big ugly hack. if i clean it up, i might post it in a few days. i'll add it to my ever increasing list of things to do.


WSH Panel Mod script discussion/help

Reply #3294
@hurricane, try this in your panel... https://dl.dropboxusercontent.com/u/2280132...emp/migrate.txt

any errors should be reported in the foobar console. i don't need to see them all - just a few will do.


@marc2003
Results using your latest migrate.txt script. Progress! Some hundreds more were moved over. And the new 'be patient' message is great!

Folders without image/txt files deleted: 0
Folders without image/txt files not deleted due to errors: 0

Folders with image/txt files to keep: 1767

Of those folders to keep, 488 were matched against artists in your library and moved successfully.
There were 169 errors moving folders for artists in your library.

There are 1110 folder(s) remaining that don't match artists in your library.

Here are the console errors. They are all the same thing 'path not found' so I only copied a few.
Migrate: Error: Path not found
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_lastfm\3052812039
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_data\artists\Cutting Crew 
Migrate: Error: Path not found
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_lastfm\3373205482
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_data\artists\Cypress Hill 
Migrate: Error: Path not found
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_lastfm\1592663918
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_data\artists\David Grant & Jaki Graham 
....
Migrate: Error: Path not found
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_lastfm\1643774920
Migrate: C:\Users\Andy\AppData\Roaming\foobar2000\wsh_data\artists\Whitney Houston

@marc2003

I did some checking on the folders that did not migrate. Here's some examples.

Case 1: Is your migrate.txt script case-sensitive?
Cece Winans did not migrate. She actually spells her name CeCe Winans with upper and lower case letters. So at some point in the past, I went through and mass renamed all her files in my library from Cece to CeCe. So there is no artist with the lower-case spelling left in my library. I guess that's why it didn't migrate.

I did get another folder with all the CeCe Winans photos that did migrate ok.

Case 2: Extra spaces in names. (this one is probably 80% of what i found)
Artists have extra space(s) before or between or after their names did not get migrated. Again this probably because I occasionally run a script that corrects spacing errors in mp3 tags with MP3TAG.
So the old folders are gone from my library and did not migrate.

Case 3: Bad ID3 tags.
There were a number of folders/files with ID3 tags which had incorrect artist info. A typical example is where the song title and artist are put together into the artist tag.  Again after I correcting these tags, the migrate script would not move the old folder. So that's good.

So bottomline, it looks like in most cases, I'm not actually missing any folders or files in the migration. Just old junk.
BUT there are few, that I can't figure out why they didn't migrate? All the tags and names look good.
In any case when I play them in foobar now, new artist photos are downloaded so it's not a big deal. And probably not worth the effort to troubleshoot.

Hope this helps with your script.

WSH Panel Mod script discussion/help

Reply #3295
file>preferences>tools>biography server>artist tab. specify path in the image box and it works automatically??

you can't change the extension because the component saves the file as-is. you'll have to account for this with multiple $if $fileexists statements in your info panel. (or you might look to see if it supports wildcards - i have no idea)

edit: that biography view component is weird. when i play a new artist, it displays the image for the previous one?? if it takes time to download a new one, i'd rather see a blank panel than the wrong image.




Finally i managed to work...see picture1 and picture2

i can refine a bit the configuration to "write" in lowercase the name of the artists. the artists pictures are displayed correctly in the trackinfomod ...but sometimes last.fm and the biography view saves pictures in *.jpg and many sometimes in *.png. And i don't know to tweak my code to show both types of files...

Code: [Select]
//Artists Pictures
$puts(pos.horizon2,$muldiv(%_height%,4,7))
$puts(pos.shadow2,100)
$puts(pos.artx2,$sub($div(%_width%,2),868))
$puts(pos.arty2,$sub($get(pos.horizon2),167))
$puts(path.noartist,/images/cui/noartist.png)
$puts(path.artistPath,$if($fileexists(Z:\artists pictures\%artist%.jpg),Z:\artists pictures\%artist%.jpg,$get(path.noartist)))
$puts(text.noartist,no picture)
$puts(text.artist,$if($fileexists(Z:\artists pictures\%artist%.jpg),%artist%,$get(text.noartist)))


there sometype of *.bat file to "auto-convert" newly adde files in the folder into *.jpg ??
more or less, minus is best

WSH Panel Mod script discussion/help

Reply #3296
Case 1: Is your migrate.txt script case-sensitive?

not the migrate script but unfortunately the old thumbs/now playing script was. every time you changed the case of an artist tag, a new folder would have been created because i used the $crc32 function without using $upper or $lower. now i'm using actual artist names, it's no longer an issue.

the fact my updated script found more folders to move successfully does indicate that you still have lots of artists in library tagged with different cases. the reason the migrate script failed before is because the "move" folder function i used doesn't work when the new folder already exists. i changed it to "copy" instead and that's why we got better results.

edit: you might try foo_facets. that actually lists the same artists with different case separately. i thought album list did this as well but i'm mistaken on that - unless it used to but has been changed

obviously trimming spaces will affect the folder naming - infact my new script would have that same issue. edit2: i've fixed this. leading/trailing spaces are trimmed on all title formatting. users of new scripts can right click the panel>Update script.

i'm at bit of a loss to explain those "path not found" errors. 

WSH Panel Mod script discussion/help

Reply #3297
And i don't know to tweak my code to show both types of files...


try this.

Code: [Select]
$puts(path.artistPath,$if($fileexists(Z:\artists pictures\%artist%.jpg),Z:\artists pictures\%artist%.jpg,$if($fileexists(Z:\artists pictures\%artist%.png),Z:\artists pictures\%artist%.png,$get(path.noartist)))


and please post in bio component thread with any more issues. this is bit off topic for in here.

WSH Panel Mod script discussion/help

Reply #3298
Case 1: Is your migrate.txt script case-sensitive?


not the migrate script but unfortunately the old thumbs/now playing script was. every time you changed the case of an artist tag, a new folder would have been created because i used the $crc32 function without using $upper or $lower. now i'm using actual artist names, it's no longer an issue.

the fact my updated script found more folders to move successfully does indicate that you still have lots of artists in library tagged with different cases. the reason the migrate script failed before is because the "move" folder function i used doesn't work when the new folder already exists. i changed it to "copy" instead and that's why we got better results.

edit: you might try foo_facets. that actually lists the same artists with different case separately. i thought album list did this as well but i'm mistaken on that - unless it used to but has been changed

obviously trimming spaces will affect the folder naming - infact my new script would have that same issue. i guess i could trim the leading/trailing spaces when creating folders. please don't tell me there are artists out there who use that intentionally. 

i'm at bit of a loss to explain those "path not found" errors. 


My guess on the "path not found" is that its probably a difference between the script language and Windows. Windows folder names do not respect trailing spaces. So to Windows Madonna and Madonna (space) are the same folder. In fact Windows won't let you create a folder with trailing spaces. It gets truncated with no warning message. So if your script is looking for Madonna (space) folder that it just created, because that's what the ID3 tag artist name was, then it won't find it.

WSH Panel Mod script discussion/help

Reply #3299
btw, you mentioned mp3tag before but foobar can find leading/trailing spaces for you. Library>Search

Code: [Select]
"$ifgreater($len(%artist%),$len($trim(%artist%)),1,0)" IS 1


select all results>properties>right click the artist field and select Clean up