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: [Not my release] Biography view (Read 542972 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] Biography view

Reply #425
Romor, new script works well.  I tried to tweak lines 56 and 103 to recognize line breaks in the original text, but my tries failed, and these may not even be the lines I needed to tweak for that.  Any suggestions appreciated, and thanks again for your efforts.

[Not my release] Biography view

Reply #426
There does seem to be different behavior with the new script concerning character decoding.  Although selecting ANSI decoding worked with the prior script to display characters like the grave e in fiance, the current script displays a comma instead of the final character in fiance with ANSI decoding.  I changed between ANSI, UTF8 and UTF16 in the component options but could not get fiance or words with other special characters like the (temperature or angle) degree character to display properly.

[Not my release] Biography view

Reply #427
To avoid fragmentation, script can be viewed here: http://db.tt/erPq5XpB and downloaded from here: http://db.tt/RnrNrwQ3
Any further changes will reflect there without using pastebin

Thanks godrick (and others reporting problems) for helping me make script better for all of us
I corrected the problem, and additionally extended discography match for biography part and commented main parts in the script to be easier to tweak things.

godrick, I don't know why you have problems with character encodings. What OS do you run? Try to run it on command line and see if there is some problem, maybe global CP for Windows shell can affect things? I can't see problem here and further more I didn't change anything that could affect character encodings.

[Not my release] Biography view

Reply #428
Very puzzling.  I don't know what you mean by "global CP for windows shell" or "try to run it on command line" means, but I'm willing to try anything.  I'm running Windows 7.  The only aspect of my Foobar2000 or computer confguration that I am aware of changing since Dec 2 is changing this allmusic script and going from Foobar2000 1.1.0 beta 2 to the released 1.1.10. 

I uninstalled and reinstalled Foobar2000, did the same for the bio component, reverted back the old alllmusic script from mid November 2011, and reverted back to 1.1.10 beta 2.  No effect.  Rebooted my computer a few times, no effect.  Tried to change the "run external script" output of the new allmusic script from "via standard output" to "via file", but never could get any file result from the bio component.  Tried changing among the various character codes again, no change in the ANSI output or anything readable with the other codes.  Tried the script with and without the extra code to ignore parenthetical info, no effect.

The problem remains constant across the various config changes I mentioned above.  In a little more detail, when character mode is set to ANSI with the new script, special characters echo as gibberish, and thus the strings being passed to allmusic are gibberish and not returning hits.  The rest of my computer, the rest of Foobar2000 and the rest of hte bio component that does not use this allmusic script correctly display the special characters.  For example, the wiki source that comes with the bio component correctly reads, ecos, and passes on the correct characters to the wiki site and gets hits and returns correct results in the bio component.

An example with screenshots for the album Dúlamán, echoing the value for ALBUM right after ALBUM = ARGS.Item(1) in the script:

returned by the wiki source (a correct result):  http://img39.imageshack.us/img39/485/wikis...turnedbybio.jpg
returned by allmusc script set to ANSI (a bad result): http://img196.imageshack.us/img196/6650/al...cereturnedb.jpg
screenshot 1 of my album script call: http://img835.imageshack.us/img835/4725/al...bscriptpic1.jpg
screenshot 2 of the rest of my script call: http://img94.imageshack.us/img94/8544/albumtabscriptpic2.jpg

Romor, if things look good on your and others' ends then I am doing something wrong, but I can't figure it out.  Sorry to bother you with something so minor compared to the great advances your scripts have taken, but any ideas welcome!

[Not my release] Biography view

Reply #429
godrick, it has nothing to do with foobar version or script changes, it's just the way how Biography View component works with stdout (not that I know how). Option "via file" reads file instead executing command, so you don't need that

By command line I meant: press "Win+R" - type "cmd" then hit Enter - "CD" to folder where the script is located - execute script `cscript foo_allmusic.vbs some_problematic_artist some_album`
If you see output problems, check global CP in shell by typing "CHCP", then try setting unicode by executing "CHCP 65001" and running script again (on command line) You also need appropriate console font like Lucida Console

OTOH, from you screenshot letter "ú" is misinterpreted, although it is represented by same bytes in both UTF-8 and ANSI and I don't know why that could be.

Try setting script execution in Biography View like this:

Code: [Select]
cscript //U //Nologo foo_allmusic.vbs %album artist" "%album%"

and set character set to UTF-16 and see if that solves anything

I have no more ideas what to suggest if above does not resolve things

[Not my release] Biography view

Reply #430
Problem appears solved by adding the //U option and setting character code to UTF16!  Prior to trying the //U option, verything looked fine when I ran the script from the command line.  My code page was set at 437 and the special characters displayed correctly.

thanks again!

[Not my release] Biography view

Reply #431
I updated script (link on post #428)

New feature is song review, which is triggered if additionally %title% argument is passed to the script.
Example:


It's not so common feature, only ultra popular artists have song reviews on some of their top singles

[Not my release] Biography view

Reply #432
Romor, if I can impose on you again for some thoughts:

In general, your latest script works great, but in a few cases it misses reviews that your version from a few weeks ago picked up.  I think it's because of how you've tweaked the regular expression (RE)  to look for matches, but I'm not up to speed yet on RE to figure out exactly what is happening and what to tweak some more. 

For example, your script from a few weeks ago that contained the following RE looking for matches is able to pick up 4 matches for Suzanne Vega's 99.9 F° and display a review:

RE.Pattern = "title=""100%""[\s\S]*?<td><a href=""(\S+)""[\s\S]*?<td>([\S ]+)</td>"

But with the RE looking for matches in the latest script, it returns zero matches for the same artist and album:

RE.Pattern = "title=""(100|9.)%""[\s\S]*?<td><a href=""(.*?)"">(.*?)<[\s\S]*?<td>(.*?)</td>"

I tried to crudely swap out each of the RE components in the new pattern (one at a time) with the old pattern component to see if I could narrow it down, but no joy.

It could be a situation of tradeoffs where the new pattern is more robust overall but there will be a few cases that slip through that matched before, and if that's the case, then that's OK, but if if there is something obvious that could be tweaked to pick up cases like my example album without compromising other matches, that would be great.

For what it's worth, none of the issues regarding character codes I was having is a factor as far as I can tell - all characters echoed appropriately in all cases.

thanks again.

[Not my release] Biography view

Reply #433
Please forgive my clueless-ness. I have character encoding set to UTF-16 and run external script at the top of the bio component preferences, however bio panel always shows the following.

Usage: cscript //U //Nologo scripts\foo_allmusic.vbs "%album artist" "%album%" ["%title%" | bio]

I am using romor's latest script and have it installed in C:\Program Files (x86)\foobar2000\scripts

 

[Not my release] Biography view

Reply #434
godrick you are welcomed  as well as others that might have problems with the script

Issue with your example seems like this:

Script requests literally "http://allmusic.com/search/album/99.9+f°" but last special character is discarded by MS XMLHTTP object. There probably is a reason why it does that, although there are no problems generally with UTF-8 strings. Because of this, response is taken from "http://allmusic.com/search/album/99.9+f" where highest available relevance factor is 88% while script accepts >= 90% (and older version strictly 100%). So if you change "(100|9.)%" to let's say "(100|8.)%" (which I don't recommend) you'll get results

@Bob: that output is if you don't pass required arguments to the script

[Not my release] Biography view

Reply #435
Currently I have my music set up like this:

Artist/Album/...

I have this formatted to use with XBMC which allows me to export NFO files for all artists and albums, so each Artist folder has an artist.nfo file that contains a bunch of information about the artist formatted in XML.  The biography information is contained within the tags <biography>...</biography>.  What I would like is to run an external script to pull this information, that way my foobar biography is an exact copy of my XBMC biography.  Can anybody help?  Thanks in advance.

[Not my release] Biography view

Reply #436
Romor, I've encountered a few types of Allmusic script searches that fail to find album review hits in the component, but when repeated in a browser, return hits:

1) albums where the album artist is "various artists".  Two examples of such searches are "The Breakfast Club" and "Red Hot + Blue: A tribute to Cole Porter".  The Breakfast Club is a soundtrack, but i don't thank that attribute is contributing to the problem based on my tests.
2) albums with a "/" in the album title. 

The cause and solution to the first type is a mystery to me.  The cause of the second is obvious, but I don't know how to tweak the script yet to ignore or replace occurrences of "/" in the album title.  I suppose the same type of issue also occurs when "/" is present in an artist or album artist tag, but I don't have AC/DC albums in my library  .  As always, any help appreciated.

A tweak to consider as well regarding artist bios: currently I've entered two calls for your Allmusic script to execute for the Artist tab in the Biography component, with the first call using "album artist" and the second using "artist", such that when I encounter a compilation album with album artist = "various artists", the first script essentially fails to find anything and second script then runs and looks for a bio on the track artist.  This works just fine, but perhaps a more elegant solution would be to pass both artist and album artist to the script and use the artist tag when album artist = "various artist".  Again, I'm completely happy with my current approach for album artist and artist bios, but this tweak would be slick.

[Not my release] Biography view

Reply #437
Updated allmusic script: http://pastebin.com/FCtBZvrs

And there may be issues as I just merged it, and tested on couple of releases. It looks fine to me, but if there are problems do report


I am a complete newbie when it comes to foobar customization and using scripts, I came across this forum and biography view because in my foobar v1.1.10 "Run Service -> AllMusic Album" only brings up the home page of AMG, not the artist or album page.

Concerning biography view the last.fm info works, but if I choose "Run external script", after having put the script in a scipts folder and added the path, I always get an error message in the biography view panel saying that (I am translating, as my error message is in German because of German Windows XP): "Input Error. The script file C:\Programme\foobar2000\scripts\foo_allmusic.vbs" could not be found."

But the script is in that exact folder, the script name has not been changed, either.

Any ideas what might be wrong?  I have tried everything, checked the path several times, put the scrips folder in the hidden user folder on C:, as well, but the error message stays the same.

[Not my release] Biography view

Reply #438
1) to fix run service>allmusic album, go to preferences>run services, select "allmusic album" among the services, and enter the following under "path" (insert everything between the double quotes but don't enter the double quotes): 

"http://www.allmusic.com/search/album/$replace(%album%, ,+)"

2)you only have one double quote at the beginning of your error message and two near the end, so I'm not confident exactly what your error message really was, but check that you've entered double quotes around your script path and around the album artist and album tags, with the path and tag references separated by spaces, per:

cscript //Nologo "C:\Programme\foobar2000\scripts\foo_allmusic.vbs" "%album artist%" "%album%" bio

[Not my release] Biography view

Reply #439
Thanks a lot, Godrick!

Unfortunately, only the run service works now.

As for the script problem, I actually forgot one double quote in the translated error message.
In the script execution command I in the preferences menu I used "cscript //Nologo scripts\foo_allmusic.vbs "%album artist%" "%album%""
Now, after your help, I pasted your "cscript //Nologo "C:\Programme\foobar2000\scripts\foo_allmusic.vbs" "%album artist%" "%album%" bio"

The error message, however, has not changed a bit.

It still complains that the script "C:\Programme\foobar2000\scripts\foo_allmusic.vbs" was not found. (Even though it definitely is still in the scripts folder).

Never mind, I realize that this is a problem that is hard to reproduce, at least I can use the bio script with the last.fm setting and use the run service. This is not as nice as an integrated album review panel, but the next best thing.

Thanks for your efforts

[Not my release] Biography view

Reply #440
The only other possibilities I can think of are 1) if you hit the "download" hypertext on the script download page, it will download the file to the default name "foo_allmusic.vbs.txt", so you need to manually eliminate the last four characters of the filename so that it has the proper extension, or 2) there is some subtle character difference in the filename in your scripts directory and the fiename used in the script call (perhaps zeros instead of letter 'o's, or one underscore in one place and two underscores in another).  If you navigate to the script file within Windows Exporer, select it, and then copy the path and then paste that path into your script, that might eliminate such a typo.  Good luck!

[Not my release] Biography view

Reply #441
The only other possibilities I can think of are 1) if you hit the "download" hypertext on the script download page, it will download the file to the default name "foo_allmusic.vbs.txt", so you need to manually eliminate the last four characters of the filename so that it has the proper extension, or 2) there is some subtle character difference in the filename in your scripts directory and the fiename used in the script call (perhaps zeros instead of letter 'o's, or one underscore in one place and two underscores in another).  If you navigate to the script file within Windows Exporer, select it, and then copy the path and then paste that path into your script, that might eliminate such a typo.  Good luck!


It works! 

Thanks ever so much, Godrick!

It was in fact the file type mistake, I saved the script again from within word pad with the file name in quotation marks.

I have one more question for now: is there a way to show the AMG rating (1-5 stars, including half stars)?


[Not my release] Biography view

Reply #442
Is there a way to make biography images appear as a background image in my foobar? Also, can I have biography image in instead of my front cover image taken from my hard drive? Basically what I am asking is, how can I have my front cover image and my background image downloaded from this service instead of using images from my hard drive?

[Not my release] Biography view

Reply #443
What is the possibility of writing a script that well display all previous releases by an artist? I was thinking an excellent script could be made to work with with discogs.com that could display all artist releases (so you can see what you may be missing in your collection) and possibly as far as displaying other releases on the same record label.

[Not my release] Biography view

Reply #444
Is there a way to make biography images appear as a background image in my foobar? Also, can I have biography image in instead of my front cover image taken from my hard drive?


You can have biography view save the cover image to hard disc and ensure the location is added as a front cover source. However, since I think artwork is normally read at the start of track playback, the saved cover would not be available for the now playing track but would show on subsequent plays and so this approach may or may not suit you (there may be complex/inefficient ways round this depending on the plug-in displaying the cover). Similar arguments apply to use as a background image. Of course you can use biography view to just display the cover without text in a panel, which would work fine for the now playing track, if that's all you want to achieve. Finally, there is a biography server\misc option to provide artwork to other artwork viewers that is described as an unsupported experimental option + its not available for some artwork viewer components (e.g. PanelStackSplitter), but I have no experience of using this feature.

HTH

[Not my release] Biography view

Reply #445
Is there a way to have the AMG star rating  downloaded from the AMG server, displayed by Biography View, and, if possible, saved into a tag?

[Not my release] Biography view

Reply #446
Is there a way to make biography images appear as a background image in my foobar? Also, can I have biography image in instead of my front cover image taken from my hard drive?


You can have biography view save the cover image to hard disc and ensure the location is added as a front cover source. However, since I think artwork is normally read at the start of track playback, the saved cover would not be available for the now playing track but would show on subsequent plays and so this approach may or may not suit you (there may be complex/inefficient ways round this depending on the plug-in displaying the cover). Similar arguments apply to use as a background image. Of course you can use biography view to just display the cover without text in a panel, which would work fine for the now playing track, if that's all you want to achieve. Finally, there is a biography server\misc option to provide artwork to other artwork viewers that is described as an unsupported experimental option + its not available for some artwork viewer components (e.g. PanelStackSplitter), but I have no experience of using this feature.

HTH


Thank you for your reply. I managed to do that and it works great.

[Not my release] Biography view

Reply #447
I've just started using this great little plugin and am really liking it.

However, I'd like to retrieve the artist info AND the album info. As you can see from the screenshot (http://anonym.to/?http://i42.tinypic.com/x26l4m.jpg) I don't retrieve the album info from Wikipedia (https://en.wikipedia.org/wiki/Goodbye_Cruel...rld_%28album%29) - see the right hand panel, where it should be displayed.

I realise this is probably a really stupid question, but any ideas for solving this? Hopefully I'm not the only person struggling with basic things like this!

[Not my release] Biography view

Reply #448
Everything working perfect!
Perhaps I'm misunderstanding what the output method in external scripts is. If file is selected the displayed output in the
panel can be saved as a text file?

[Not my release] Biography view

Reply #449
When I discovery this plugin I thought it would be great to automatically download a folder picture
if I play any song of an album.

.jpg is the required (at least for most players that look for a folder image) extension for such a picture
but somehow the plugin doesn't want to save it as a .jpg but as .png?

My settings for last.fm:
Artist: Disable saving downloaded data

and more importantly:

Album:
x Enable cache
Image: $directory_path(%path%)\folder

This works so far but it puts a folder.png file into the destination folder for an album, not a .jpg
Is this extension configured elsewhere?

Regards,
Highend