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 490706 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] Biography view

Reply #500
PeteG,

I'd also like to see what you try, even if you don't succeed, in addressing character issues for the artist (or album) string.  I have a few artists that screw up searches because of this, and they'd probably work if I could make use of the $ansi title formatting command in a vbscript, but I never bothered to figure out anything beyond the use of Replace for certain individual characters.

1) I can't explain why: I can only admire the mystery of the necessity of //U in the panel script call.  The rest of my foobar2000 config displays all characters correctly without any special settings, and the //U option is not needed to correctly display script search results in my cmd window, but if I don't use in my panel script call, the bios and reviews terminate at the first non-ASCII character.  The need to select UTF16 as the character set to correctly display UTF8 characters in the panel makes even less sense.  But since using the //U option and UTF16 setting works, and reinstalling my Win 7 32 bit OS did nothing to change anything, I gave up doing anything more to understand it.

3) You can never have too many Zappa albums.

[Not my release] Biography view

Reply #501
What is it?

It's a dirty hack, a stop-gap solution. No celestial programming at all. I (mis)use your md5 hashing function to cheat AMG. Later this night I'll post my rather confusing experiencies so far.

Quote
1. Yes //U option outputs UTF-16 encoded stream which UTF-8 option can't catch ...

I see.

Quote
I don't know if they change reviewes thou, but as datetime is easy in vbs, maybe I'll add it.

No, reviews are propably not altered, even that some of them are indeed sadly short (read: useless). The datetime thing was just a thought; it only makes sense if the user uses your caching function, I don't know if it's worth the trouble (but it certainly has my vote).

Quote
File is loaded async by default, by XML parser.

I see. At least I see something in the fog. Some reading on the async subject is on my todo list.

Quote
There are many artists with same names, and pairing artist with album solves couple of problems in one turn

Yes, of course. Looking in a mirror I see a nincompoop. I do actually have one album with Air (the jazz outfit) and a couple of albums with the French electronica duo Air. And your script distinguishes perfectly between them. Quite impressive, especially because I retagged the jazz group to Air [2] ages ago.

Quote
Also you could aggregate cache file from command line

Indeed? Do I have to do some piping or redirection in a cmd window, or does it function out of the box and append new entries to my dear xml file? I haven't got the nerve ... eeh time ... to try. I could of course start from scratch in another folder and see what happens.

[Not my release] Biography view

Reply #502
I'd also like to see what you try, even if you don't succeed ...

As mentioned above, the hack is on it's way. But if you don't - and don't intend to - keep a local xml copy (i.e. use the cache capability of romor's script) it won't help at all, I'm afraid.

Quote
You can never have too many Zappa albums.

Words of Wisdom, Sir, Words of Wisdom.

[Not my release] Biography view

Reply #503
@users of romor's foo_allmusic.vbs script; the cache version only (as of Oct 19 2012)

An example
AMG has given the Magma album Ẁurdah Ïtah from 1974 the name Wurdah Ïtah. Probably because of the nasty Ẁ. foobar2000 has no problems showing the correct name, no need to change it. But it also means no review in the Bio view panel. If you are a nitpicking person as I am, my guess is that you want to keep your Media Library under your own control and not being dictated by AMG's naming habits. Without sacrificing the ability to read bios and reviews inside foobar2000.

The far from perfect solution
romor's script relies heavily on md5 hashing to pair %album artist% with %album%, which is very useful, also for this purpose. We'll need two values; use a netbased 'md5 Hash Generator' (google that) to generate them as the first thing:

Code: [Select]
MagmaWurdah Ïtah = fceefee8667867ce42b52a62c42fa934
MagmaẀurdah Ïtah = 86b77a24e045cfd1e53a111bb488d399

A note to the uninitiated: md5 is extremely critic, as it must be by nature; doublecheck your typing, or use copy & paste on the form

Code: [Select]
Album ArtistAlbum

You need to create a text file for that purpose. Keep it open on the desktop. No space between the two string values. Copy the two hexadecimal strings to the newborn text file, one by one.
In foobar2000: Rename the album to (AMG's) Wurdah Ïtah, after a few seconds of playback the review pops up (together with the bio) and will now be stored as the last entry in the foo_almusic.xml file.
Stop the celestial music. Open foo_almusic.xml in a proper editor, my favourite is Notepad++, it's XML capable; Microsoft's XML Notepad is the fancy one of the two, but Notepad++ is much more versatile. Both are free. Notepad won't do, it gets indigestion when it comes to big files. Before you start the brutal treatment of the xml file: Make a backup.
In the editor: Search for the Wurdah Ïtah string, fceefee8667867ce42b52a62c42fa934. Replace it with the Ẁurdah Ïtah string, 86b77a24e045cfd1e53a111bb488d399. Save.
Back in foobar2000: Rename the album to Ẁurdah Ïtah, i.e. the original name. Start playback of the correctly named album and the review pops up. Pure cheating.

Some sad remarks
While this primitive solution might work in some situations, further investigation has only made me confused on a higher level.
I do agree with AMG that the name of a 1976 Magma album is Üdü Wüdü. A review exists - but the script didn't grab it. Hence I renamed the album to Udu Wudu - and voilá, the review popped up. Afterwards I restored the album's name and made the necessary search & replace in the xml file. But what happended?
Similar situation with Ëmëhntëhtt-Ré. The reviews exists under the right album name, but was not in my xml file. A temporary renaming to Emehntehtt-Re did the trick.
More confusion: La Trilogie Theusz Hamtaahk [AMG], Theusz Hammtaahk - Trilogie [PeteG]. No temp. renaming necessary, that review was already in my file.
More yet: Kohntarkosz Anteria (K.A.) = [AMG]. Köhntarkösz Anteria = [PeteG]. That review was already in my file.
The last burp: 1,001 Degrees Centigrade [AMG]. 1.001° Centigrades [PeteG]. That review was already in my file.

When it comes to Album Artist mismatches, I have only made a single experiment at the moment. It's totally incorrect, but I prefer to have all my Zappa albums tagged with his name, including all The Mothers of Invention and Mothers stuff. Happily AMG stores the MoI reviews under Zappa's name as well. With one exception, Ahead of Their Time. I did the now trivial thing:

Code: [Select]
md5(Frank ZappaAhead of Their Time) = 2a4b223000797a151e0f02926e365b0f
md5(Mothers of InventionAhead of Their Time) = f9a74177cf8bb886accf920872192967

The script grabbed the review and the MoI bio. After restoring to Zappa state, the panel shows the AoTT review together with the FZ bio. And I have the MoI bio in the xml file tied together with the review, but for no use.

Further experiments are inevitable, I'm afraid. I have only used romor's script for a couple of days and haven't even had the time and opportunity to read more than a few of the newly collected bios and reviews. In the meantime: feedback will be highly appreciated.

[Not my release] Biography view

Reply #504
Addendum to Post #504.

This is absurd, I should have seen it a long time ago: The URL in the address bar producing the review in the browser has not necessarily much to do with album name shown on the AMG page.

Example: allmusic.com/album/emehntehtt-re-mw0001345405

gives

Magma
Ëmëhntëhtt-Ré

Blindly copying the name AMG uses in the headline in a review (as I have done) isn't always useable, especially in situations with accented letters.

Hmm, 4 postings in a row from yours truly. It begins to look like I'm spamming the thread. It is by no means the intention, I truly hope that the moderators will be forgiving. I'm obviously not capable of doing my homework properly before posting.
Next time I'll do my damnest.

[Not my release] Biography view

Reply #505
Quote
Do I have to do some piping or redirection in a cmd window, or does it function out of the box and append new entries to my dear xml file?

I mentioned it, to make other potential user think twice about doing it. Can be done in many ways, and perhaps generally easiest by using text tools component to generate commands.

Quote
Words of Wisdom, Sir, Words of Wisdom.

I just saw his lengthy biography, which redundant copies make maybe 2MB alone in your cache.
But it doesn't matter to performance, and there is no other easy way out

Quote
my favourite is Notepad++, it's XML capable; Microsoft's XML Notepad is the fancy one of the two, but Notepad++ is much more versatile

There is also XmlPad (freeware, not developed anymore) which IMHO comes closest to something like XmlSpy. I would suggest that

[Not my release] Biography view

Reply #506
PeteG, disc space is cheap, so it would seem the best bang for the buck is coming up with an approach to achieve more search hits than saving disc space.  More importantly, as a new member of the Romor Fan Club, you are required to admire the elegance of the caching approach 

In trying for more search hits, it seems you've figured out that there is no need to change what is in your file's tag fields, you just to need to experiment with processing the strings passed to the script sufficiently to get hits with Rovi's fuzzy search approach.

I'd like to use title formatting in a vbscript to invoke $ansi to deal with many of the character challenges you are experimenting with, and the WSH panel mod component seems to state that this is available in both java and vb scripts via the global object fb - IFbUtils as described in interfaces.txt.  But I've never seen an example of title formatting or any other fbutils method used in a vbscript, nor have I been able to guess the right way to call it in a vbscript  - anyone have an example to share?  thanks!

[Not my release] Biography view

Reply #507
@godrick, the functions in the interfaces.txt file you mention are exclusive to WSH panel mod. they can't be used in any old vbscript.

but if you want to test $ansi, simply pass $ansi(%album aritst%) on the command line instead of just %album artist% in the bio panel settings. i'd assume that as tags are supported, functions are as well??

[Not my release] Biography view

Reply #508
Yes, I'm aware I'd need to run the vbscript in a WSH panel, which is why I didn't pursue it with much vigor.  But I did not think of trying title formatting in the script call, and it works!  thanks for the suggestion as always.

[Not my release] Biography view

Reply #509
PeteG, disc space is cheap, so it would seem the best bang for the buck is coming up with an approach to achieve more search hits than saving disc space.  More importantly, as a new member of the Romor Fan Club, you are required to admire the elegance of the caching approach

1. I'm not afraid of running out of disc space, with a total of 9 TB I'll have a lot of free space in a foreseable future. My only (and initial) concern was a possible impact on load time in the Bio panel due to increasing xml file size, nothing else whatsoever. Btw, the load time in the panel of a bio|review from the +20 MB file is less than 1 s. Truly amazing and compared with an online search the time is negligible  .
2. I'm not quite sure what you mean. Rest assured, I'm deeply impressed of romor's programming skills, the script is a godsend. But if I have offended someone, I'm terribly sorry; it might be because of my rusty school English .

[Not my release] Biography view

Reply #510
There is also XmlPad (freeware, not developed anymore) which IMHO comes closest to something like XmlSpy. I would suggest that

You are right! XmlPad is intuitive and versatile; I'll stick to that. Thanks for the tip .

On your suggestion I have played with the command line part for a few hours, and have a couple of questions:

Code: [Select]
cscript //U //Nologo romor\foo_allmusic.vbs "Supersilent" "9" review
cscript //U //Nologo romor\foo_allmusic.vbs "The Jelly Jam" "2" review
cscript //U //Nologo romor\foo_allmusic.vbs "Susanna and the Magical Orchestra" "3" review

returned nothing. Common for the 3 searches is Album = digit.

Code: [Select]
cscript //U //Nologo romor\foo_allmusic.vbs "Supersilent" "Supersilent 9" review
cscript //U //Nologo romor\foo_allmusic.vbs "Susanna and the Magical Orchestra" "Susanna and the Magical Orchestra 3" review

returned the reviews. Nice, but not obvious.

Code: [Select]
cscript //U //Nologo romor\foo_allmusic.vbs "The Jelly Jam" "The Jelly Jam 2" bio
cscript //U //Nologo romor\foo_allmusic.vbs "The Jelly Jam" "The Jelly Jam 2" review

returned the bio, not the review (the review exists). Not nice, not obvious. Are all this due to some weird internal AMG handling of the searches?

Code: [Select]
cscript //U //Nologo romor\foo_allmusic.vbs "Various Artists" "Tribute to Miles" review

results in a VBScript run-time error:

Code: [Select]
... Object doesn't support this property or method: div.lastChild.firstChild.getAttribute("href")

It's line 24 in the script. Same run-time error occurs when "Artist Name" = "Original Soundtrack" (another album, Mamma Mia! ...). What am I doing wrong  ?
Besides these minor issues are supplemental cscript searches from the command line indeed very useful - the cache is getting bigger and bigger, wonderful .
romor, your help so far is much appreciated. Thanks a lot.

[Not my release] Biography view

Reply #511
Thanks for your report. Script is updated with these changes:

- if album name is less then 3 chars, artist is included in query string
- scenario when artist is non-existent (i.e. various artists and similar) is considered, and at the same time this feature requested by godrick was added as it was convenient

PeteG, now you should be able to get results from all above reported examples, except for "The Jelly Jam" - "2" as far limit case, not worth explaining

[Not my release] Biography view

Reply #512
Wow, PeteG, that Jelly Jam 2 case is rather unique!  In short, not only do The Jelly Jam have an album named "2", they also issued a double release that combined their previous albums "The Jelly Jam" and "2" that allmusic refers to as "The Jelly Jam/2".  That double release is listed highest in the allmusic search results and is thus achieves a match to your search when you use either "2" or The Jelly Jam 2" as your album string, but there is no review on allmusic for that double release.  All of those coincidences had to happen to end up with a bio and no review for those album strings with the previous and revised script.

To determine that I copied the script search URL into my browser, looked at the page source code of the results, and added echo statements to the script to find the album and artist links the script was finding (or not finding) - I do this fairly often when I don't understand what happened with a search.

The new method of concatenating short album names to artists is quite effective in finding valid results more often and faster - thanks, Romor!

[Not my release] Biography view

Reply #513
Thanks for your report. Script is updated with these changes: ...

Eh romor, you are fast  (paraphrasing you, posting #487, )
Yes, your unexpected but highly appreciated update has solved the problems mentioned in #511. Thanks a lot, romor!
And to my pleasant surprise new reviews keep popping up on the screen. One of the major advantages using your script is that I get hits even in situations where I never would have bothered to do a manual search on AMG's site.
Various Artists: The Rough Guide to Latin Arabia|Think Global: West Africa Unwired|Jazzwerkstatt Sampler 2
are just a few, positive examples (I wouldn't have expected to find anything at all and accordingly never did a manual AMG lookup on those). Even an obscure album with Khmer Wedding Music, bought on location, had a review(!) and your highly recommended script catched & cached it.

@godrick 
Yes, The Jelly Jam thing was indeed tricky, thanks for your explanation (the emoticon is meant positively).

[Not my release] Biography view

Reply #514
@romor

I had to stop in and say thanks for creating the foo_allmusic script and maintaining it so well. Being able to reliably have AMG's bios and reviews as my primary data source in the Bio panel is what makes the plugin not just great but essential -- and your script does exactly that.

Btw, the new cache feature is a great addition. For one, it's way more efficient in terms of network bandwidth and CPU usage on my system. However, it's also my understanding that many online reference databases -- AMG in particular -- don't like (or even prohibit) "scraping" and other queries from 3rd party apps due to their (supposed) cumulative negative impact on server performance and the net result of high page load times for their intended audience of browser-based users. And, to be fair, when I see a script like the previous versions of foo_allmusic (and many other similar scripts) querying AMG's servers on every single track change, I wonder if I'm not just contributing to a time when sites like AMG find a way to block scraping and non-browser querying altogether. But the way that foo_allmusic's caching reduces the number of queries -- especially when listening to album playlists in default playback order -- it clearly lowering the profile on the whole fb2k/Bio panel/foo_allmusic combo and I imagine will greatly reduce the risk of us pissing off AMG.

Also, thanks for figuring out thate issue with Msxml2.ServerXMLHTTP vs. Msxml2.XMLHTTP. I just updated my copy of the script for the first time in a long while and I immediately noticed the reduction in delay between Bio panel running the script and the actual text being displayed in the panel.

[Not my release] Biography view

Reply #515
You are welcome musichemyst

And don't worry too much about rovi servers. Rest assure script is untraceable, not just by design, but even if all foobar users from HA would engage it w/o caching, it wouldn't have percentile impact compared just to WMP users.
Caching is for purely practical reasons, implemented as I learn more about XML. I wouldn't have made it to store in sqlite or text file.

[Not my release] Biography view

Reply #516
Somehow for me this script doesn't want to display anything. The biography panel just stays blank. Wikipedia and Last.fm work both.

As command line I use
Code: [Select]
 cscript //nologo foo_allmusic.vbs "%album artist%" "%album%" review

"bio" or "review|bio|skip" doesn't work either.

The console displays
Code: [Select]
Biography : execute command -> cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review

What am I doing wrong?


[Not my release] Biography view

Reply #517
Probably script is not in foobar's folder, in which case you have to use whole path instead just script name?
But then biography view, would show input error in panel, and you didn't mention that...

You can try to run it from command line:

c:\path-to-script> cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review

to see if it maybe doesn't work on your system for some reason

[Not my release] Biography view

Reply #518
Well, the script is in Foobar's folder. That path is "C:\Program Files (x86)\foobar2000\foo_allmusic.vbs". I also have a copy of the script file in "D:\scripts\foo_allmusic.vbs". And the panel does show the input error "Can not find script ...", if I move the script, where it can't be found by default without a whole path (at least with ANSI and UTF8, UTF16 shows me a line of Asian symbols).

If I want to use a whole path to the Foobar's folder, the path is somehow cut off and there is another input error: There is no file extension in "C:\Program Files".


But that doesn't matter, because if I use the script file in D:\scripts\foo_allmusic.vbs and the command line
Code: [Select]
cscript //nologo "D:\scripts\foo_allmusic.vbs" "%album artist%" "%album%" review

instead the panel is blank again. So I guess it can be found just like in Foobar's folder without a path specification.

Your command line executes the script, if I use double quotes for the path. Then it will prompt and shows:
Code: [Select]
Usage: cscript //nologo foo_allmusic.vbs ""%album artist%"" ""%album%"" review|bio|skip

Same if I double click on the script file.

Edit: Oh, if you meant to use your command line in Foobar instead of the cmd, it cuts off the same:

C:\Program Files (x86)\foobar2000\foo_allmusic.vbs cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
Code: [Select]
Biography : execute command -> C:\Program Files 
fail: C:\Program Files

"C:\Program Files (x86)\foobar2000\foo_allmusic.vbs" cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
Code: [Select]
Biography : execute command -> "C:\Program Files 
fail: "C:\Program Files

D:\scripts\foo_allmusic.vbs cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
Code: [Select]
Biography : execute command -> D:\scripts\foo_allmusic.vbs cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
fail: D:\scripts\foo_allmusic.vbs cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review

"D:\scripts\foo_allmusic.vbs" cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
Code: [Select]
Biography : execute command -> "D:\scripts\foo_allmusic.vbs" cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review
fail: "D:\scripts\foo_allmusic.vbs" cscript //nologo foo_allmusic.vbs "Electric Wizard" "Black Masses" review

cscript //nologo "D:\scripts\foo_allmusic.vbs" "Electric Wizard" "Black Masses" review (same as no path)
Code: [Select]
Biography : execute command -> cscript //nologo "D:\scripts\foo_allmusic.vbs" "Electric Wizard" "Black Masses" review

[Not my release] Biography view

Reply #519
Try:
Code: [Select]
cscript //U //Nologo foo_allmusic.vbs "%album artist%" "%album%" review


UTF 16
last.fm/user/boces

[Not my release] Biography view

Reply #520
The panel keeps staying blank. 

Console output:
Code: [Select]
Biography : execute command -> cscript //U //Nologo foo_allmusic.vbs "Damon & Naomi" "More Sad Hits" review

Am I missing something? Do I need a specific plugin? My Foobar version is 1.1.17.

[Not my release] Biography view

Reply #521
@vine: press "Win+R", type "cmd" and hit enter, then paste this:

Code: [Select]
cscript //nologo "D:\scripts\foo_allmusic.vbs" "Electric Wizard" "Black Masses" review

and hit enter

[Not my release] Biography view

Reply #522
Yeah, that works, romor! I've got the review in cmd. But I already tried that line in the run external script settings. The panel doesn't display the review.

[Not my release] Biography view

Reply #523
Hm, maybe you did use 'skip' argument, as you wrote in initial post?
Did script ever worked for you?

Purpose of 'skip' argument is to skip artist/album from querying once marked. So if you use this argument on certain release, the information will be written in foo_allmusic.xml (located in your case in foobar's folder) and that release will never be queried again, unless you edit foo_allmusic.xml or delete it (better delete it, if unsure in editing xml files).

I'd suggest this:
- delete foo_allmusic.xml from foobar's folder
- use same command in biography view preferences as initially (without path as script is in foobar's folder)
- if you want to use UTF-16 add "//U" switch as previously suggested by lo-fi, otherwise choose ANSI

If that doesn't solve the problem, I can't think for now what else could be.

[Not my release] Biography view

Reply #524
I only used all 3 arguments at once as in review|bio|skip. No, the script never worked and I tried many different albums. Anyway, there is no foo_allmusic.xml in my folder.