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

[Not my release] Biography view

Reply #650
yeah they do share some files - like most of the code for all my scripts is inside common7.js

but make sure you extract the whole marc2003 folder from the samples.zip though. it contains many other files not included with my playcount sync script. you can safely choose to overwrite any files if prompted.

[Not my release] Biography view

Reply #651
yeah they do share some files - like most of the code for all my scripts is inside common7.js

but make sure you extract the whole marc2003 folder from the samples.zip though. it contains many other files not included with my playcount sync script. you can safely choose to overwrite any files if prompted.


Oh my god, your panel is beautiful. Thanks, man.

[Not my release] Biography view

Reply #652
i assume you're using the built-in wiki support and not using romor's script? i'm pretty sure that doesn't show citations. i think it shows last.fm by default so you need to edit the script somewhere for it to show wikipedia instead.

or you can try my script for WSH panel mod which allows for easy switching between last.fm/wikipedia via the right click menu.

https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip <<read instructions carefully.


@marc2003
now i'm using your bio-script; works perfectly
question: you are saving the bios in folder "wsh_lastfm" - why ?
              is there the possibility to make the plugin "non-save" bios  or
              should I delete them from time to time

[Not my release] Biography view

Reply #653
This is my script, I use it for some time, and works perfectly.
This is modified Romor's script. It hase future to save Bio.txt files, and display them later..
It first search for: last.fm bio, if not found > then search for Wikipedia bio, if not found > then display text(I don't like blank panel).
*You can enter your own text.
You must enter path location, where to save Bio.txt files.
THANKS ROMOR FOR THIS SCRIPT..





Code: [Select]
folder = "ENTER YOUR FOLDER"
On Error resume Next
With CreateObject("ADODB.Stream")
.Open
.Type = 2
.Charset = "utf-8"
.LoadFromFile folder & "\" & WScript.Arguments.Item(0) & ".txt"
If Len(.Size) > 1 Then
WScript.Echo .ReadText
.Close
Else
.WriteText WScript.Arguments.Item(0)
.Flush
.Position = 0
.Type = 1
.Read = 3
For i = 1 To .Size-3
param = param & "%" & Hex(AscB(.Read(1)))
Next
.Close
Set xml = CreateObject("MSXML2.DOMDocument.6.0") : xml.async = False
xml.load("http://developer.echonest.com/api/v4/artist/biographies?api_key=OQMRCUVWC6PULGN2G&license=cc-by-sa&format=xml&name=" & param)
bio = xml.selectSingleNode("/response/biographies/biography/text[../site='last.fm']").text
If Len(bio) Then
bio = Replace(Replace(bio, ".  ",  "." & vbCrLf & vbCrLf), ".  ",  "." & vbCrLf & vbCrLf)
.Open
.Type = 2
.Position = 0
.Charset = "utf-8"
.WriteText bio
.SaveToFile folder & "\" & WScript.Arguments.Item(0) & ".txt"
.Close
WScript.Echo bio

Else

Set xml = CreateObject("MSXML2.DOMDocument.6.0") : xml.async = False
xml.load("http://developer.echonest.com/api/v4/artist/biographies?api_key=OQMRCUVWC6PULGN2G&license=cc-by-sa&format=xml&name=" & param)
bio = xml.selectSingleNode("/response/biographies/biography/text[../site='last.fm']").text
If Len(bio) Then
bio = Replace(Replace(bio, ".  ",  "." & vbCrLf & vbCrLf), ".  ",  "." & vbCrLf & vbCrLf)
.Open
.Type = 2
.Position = 0
.Charset = "utf-8"
.WriteText bio
.SaveToFile folder & "\" & WScript.Arguments.Item(0) & ".txt"
.Close
WScript.Echo bio

Else

Set xml = CreateObject("MSXML2.DOMDocument.6.0") : xml.async = False
xml.load("http://developer.echonest.com/api/v4/artist/biographies?api_key=OQMRCUVWC6PULGN2G&license=cc-by-sa&format=xml&name=" & param)
bio = (("WIKIPEDIA:" & vbCrLf & vbCrLf)) & xml.selectSingleNode("/response/biographies/biography/text[../site='wikipedia']").text
If Len(bio) Then
bio = Replace(Replace(bio, ".  ",  "." & vbCrLf & vbCrLf), ".  ",  "." & vbCrLf & vbCrLf)
.Open
.Type = 2
.Position = 0
.Charset = "utf-8"
.WriteText bio
.SaveToFile folder & "\" & WScript.Arguments.Item(0) & ".txt"
.Close
WScript.Echo bio


Else

WScript.Echo "We can't find biography for this artist. Maybe your tags are incorrect or you lose internet connection. Please note that latest one tag ''artist'' must be corrected field.. If your tag is alredy properly field, that means that thoes artist is unknown, or you enter misspeled name. Also when you played radio stream, some station does not send information about artist, so this also causes problem." & vbCrLf & "Thank you for understending.." & vbCrLf & "For further information, and posible solution, check this site:" & vbCrLf & "http://www.hydrogenaudio.org/forums/index.php?showtopic=70955." & vbCrLf & "Your Foobar theam.."


End If
End If
End If
End If
End With

[Not my release] Biography view

Reply #654
question: you are saving the bios in folder "wsh_lastfm" - why ?


because caching is good. what's the point of consulting the internet on every play? once you've built up a cache, it also means you see the text instantly on track change when the bio already exists instead of waiting that long second or two...

you can delete the *.json files on a periodic basis if you really can't afford the disk space to keep them. 

@mire777, you might consider using my WSH script as that allows for easy switching between last.fm and wikipedia via the right click menu. it means you can check the wikipedia text even when last.fm text is present and vice versa. it uses exactly the same source (echonest) as romor's script so the content will be identical.



https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip


[Not my release] Biography view

Reply #655
@mire777, you might consider using my WSH script as that allows for easy switching between last.fm and wikipedia via the right click menu. it means you can check the wikipedia text even when last.fm text is present and vice versa. it uses exactly the same source (echonest) as romor's script so the content will be identical.



I love your script, i tried it earlier. But i run Wsh panel mod 1.4.2. , and this is not compatibile with my version.
If i update Wsh panel, it will crash my skin.
I use Xch4nge skin, and there are a lot of WSH scripts..
Maybe i can change all Wsh sript in my skin, and then update. But it's a big job...
So my only solution is to somehow edit your script itself.

*EDIT: Ok i changed script, now works on WSH 1.4.2.

I have only one question:
How in your script to set transparent background?

[Not my release] Biography view

Reply #656
Ok,  It's finished. Changed background, fonts ...
Only to fix menu now.

Thanks Marc..



[Not my release] Biography view

Reply #657
ah yes. i see you're using that old modded version which allows that glass affect. you can't upgrade your component (although i think the last was 1.4.4) but you seem to have to figured out how to edit my script so it will work.

[Not my release] Biography view

Reply #658
ah yes. i see you're using that old modded version which allows that glass affect. you can't upgrade your component (although i think the last was 1.4.4) but you seem to have to figured out how to edit my script so it will work.


Yes, i found what's the difference in old and new WSH, change that, and now work fine. Great script..
Thank's Marc

[Not my release] Biography view

Reply #659
Yes, i found what's the difference in old and new WSH, change that, and now work fine. Great script..
Thank's Marc


Can you please post the edited script? I also use the old WSH and I can't update it because it breaks my skin.

Thank you.

[Not my release] Biography view

Reply #660
Yes, i found what's the difference in old and new WSH, change that, and now work fine. Great script..
Thank's Marc


Can you please post the edited script? I also use the old WSH and I can't update it because it breaks my skin.

Thank you.


Here is script: http://pastebin.com/rCiZ4xYt

Which version of WSH panel mod you use? And skin?
I don't now if you like this font, i use...

[Not my release] Biography view

Reply #661
Hm.
I've just found out, that script is doing fine on my Vista 32-bit machine, but still no luck on the Windows 7 64-bit machine.

Sorry especially to you patient Pete, but not until now I had spare time...

I made regex version of allmusic script which doesn't use mshtml library and thus no problem should be expected on different platforms and IE versions, and it's located here: https://gist.github.com/13ebd9e29260a35c8145
For some reason this regex version is twice faster than previous one using html dom, so I would advice other users to try.
It's alpha version, which I tested on couple of releases and find it work as expected.

[Not my release] Biography view

Reply #662
Sorry especially to you patient Pete, but not until now I had spare time...

Wow. I must admit that I was beginning to give up the hope. Thank you so much, romor!
I've only had time for a preliminary test, but so far everything is working as expected on Windows 7 64-bit. Some 20 albums (checked beforehand): Found and retrieved, first via cmd and then via Biography Server. 100 % backwards compatibility with the existing XML file. Very, very nice. The speed improvement is maybe of more interest for programmers? I rely on the generated XML file, and that's a quick load.

The nit-picking department: The helpline (error message) doesn't match the name of the VBS file...

As a sidenote (site note – can one say that?): Using AdBlock in a browser (Chrome) seems to prevent admission to compilations and other subgroups (and possibly other stuff?), I've just found out. Since they changed layout in July, I has been of the belief that that stuff was gone forever. Well, well, well. This has nothing to do with your script.

[Not my release] Biography view

Reply #663
What I'm doing wrong lol? Some band info is in Russian and some in English

[Not my release] Biography view

Reply #664
Romor, a belated but big thanks for your regex version.  I just got around to playing with it, and I think it works better with a little change that you probably originally intended.  I think you meant to end the For/Next loop contained in lines 43 through 53 of your latest revision upon the first match, so I added the "Exit For" line below and I get better matches as a result:

Code: [Select]
  For Each k In dAlbum.Keys
    If Match(Split(k, "..")(1), query) And Match(Split(dAlbum(k), "..")(1), Arg(0)) Then
      artistLink = Split(dAlbum(k), "..")(0) & "/biography"
      albumLink = Split(k, "..")(0)
      If result = "bio" Then
        search = biography(artistLink)
      Else
        search = review(albumLink)
      End If
      Exit For
    End If
  Next

[Not my release] Biography view

Reply #665
Romor, a few other observations on tne regex version:

I get a few more successes if the search query is in lower case (without causing any problems at least so far)
   
Code: [Select]
Set reMatch = .Execute(Request("http://www.allmusic.com/search/albums/" & Escape(LCase(query))))

    For whatever reason, that works to see the review for Pink Floyd's The Final Cut review that would not otherwise be found with either the panel or cmd window.

I've forgotten what little I knew of regular expressions, so I can't suggest specific improvements, but I found that album titles that have punctuation marks of single quotes or apostrophes (and maybe other marks) would not result in displayed reviews in the panel, but reviews would be found and displayed in a cmd window. Album titles with colons, commas, dashes, periods exclamation points or question marks did not have any problems.

Lastly, I observed that allmusic reviews or artist biographies without any attribution (no "by ..." text) would result in the correct links found, but would not display the review or biography in the panel or cmd window.  An example of a review without attribution is The Beatles' Past Masters compliation.

The regex version works very fast - I like it!

[Not my release] Biography view

Reply #666
Thanks for diving in, Godrick

Indeed, I did overlook on "Exit For" statement, which is now corrected, together with replacing two dots as separator with two tildes.

Cheers

[Not my release] Biography view

Reply #667
Is possible to have some vbs or js script that will display more than 6 image from last.fm in foo_uie_biography panel?
I don't want to download pictures in folder, only to load image in memory and display them in panel?
I use Romor script to display bio text, and it works well.
I search something simmilar for image, to use with foo_uie_biography panel, not in separate wsh panel, and i can't find?

[Not my release] Biography view

Reply #668
I don't know if anyone else has a problem, but something strange is happens with biography images.
Example for artist Madonna, i have only one image, even if i try different settings in preferences(max artwork count is set to 6), nothing happens.
I tried to reset the page in preferences, even to reinstall foobar, nothing help..
Same happens for all artist...
Does anyone have the same problem?





[Not my release] Biography view

Reply #673
I tried to download image with AlbumArt downloader from last.fm, it work ok, i download 10 images without problem...
I know it's not the same, but maybe help..


that works well so you might as well use it. the reason it still works is because it uses the website, not the API.

[Not my release] Biography view

Reply #674
I tried to download image with AlbumArt downloader from last.fm, it work ok, i download 10 images without problem...
I know it's not the same, but maybe help..


that works well so you might as well use it. the reason it still works is because it uses the website, not the API.


I know that. Would you consider to do something with echonest?
You can use link from echonest response to download image, and then display in foobar.
I make vbs script that download image from website, but i don't now how to point script to read echonest response in xml?