IPB

Welcome Guest ( Log In | Register )

32 Pages V  « < 29 30 31 32 >  
Reply to this topicStart new topic
[Not my release] Biography view
marc2003
post Feb 6 2014, 23:19
Post #751





Group: Members
Posts: 4454
Joined: 27-January 05
From: England
Member No.: 19379



the best thing to do is batch download all your album art in one go and then use the built-in artreader to display it. i don't see the point in using last.fm because the quality of most art is pretty bad. if you really want to use it as a source, album art downloader XUI supports it.

http://www.hydrogenaudio.org/forums/index....showtopic=57392
Go to the top of the page
+Quote Post
Kougeru
post Feb 6 2014, 23:36
Post #752





Group: Members
Posts: 55
Joined: 17-June 08
Member No.: 54459



It seems really iffy. Sometimes it will load instantly and sometimes it will take 30+ seconds on 40mb internet. I guess a better question is, is it possible to make it search my harddrive for album hard before searching lastfm? I assumed it would default to this but that doesn't seem to be the case and I don't see an option for it. Overall though, it's working great for me. I only had about 300 albums out of thousands that I had art scanned for so this really helps a lot even with the slow loading.
Go to the top of the page
+Quote Post
marc2003
post Feb 6 2014, 23:39
Post #753





Group: Members
Posts: 4454
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (Kougeru @ Feb 6 2014, 22:36) *
I guess a better question is, is it possible to make it search my harddrive for album hard before searching lastfm? I assumed it would default to this but that doesn't seem to be the case and I don't see an option for it.


no. there are caching options though. i'm not sure if they're on by default or not. with it switched on, you obviously won't have any delay next time you listen to the album.
Go to the top of the page
+Quote Post
mire777
post Feb 7 2014, 10:54
Post #754





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



I made a quick test about fetching album covers, works ok. but i can't recieve album info text from echonest, seems that this metod doesn't exist. So there is no point to have covers without text info...
It's easy to scratch album and bio text from last.fm web. Good question is why not use the web, instead echonest..
I test biography on echonest myself(i edited bio on last.fm) and found that this text on echonest is updated after 1 month.

This post has been edited by mire777: Feb 7 2014, 10:59
Go to the top of the page
+Quote Post
Speech
post Feb 8 2014, 15:33
Post #755





Group: Members
Posts: 61
Joined: 9-May 09
Member No.: 69642



QUOTE (free30 @ Oct 7 2010, 20:05) *
QUOTE (harumscarum @ Oct 7 2010, 13:45) *
2. is it possible to make whis plugin automaticly save albumart in album playing folder?


Go to >Preferences, Tools, Biography Server, Last.fm, then the Album tab
then in the image: space put this
$replace(%path%,%filename_ext%,)Albumart


My album folders already have a folder.jpg file, but my compilation folders don't have album art for each track.

With this code
CODE
$replace(%path%,%filename_ext%,)[%artist% - ][%album%]
you can populate compilation folders with "artist - album" covers. But the downside is that it will also create "artist - album" file where there is already a folder.jpg.

So, is there a hack so that it doesn't create a new file if folder.jpg already exists in the same folder?


--------------------
Mon blog: http://piratefurieux.wordpress.com
Go to the top of the page
+Quote Post
marc2003
post Feb 8 2014, 15:47
Post #756





Group: Members
Posts: 4454
Joined: 27-January 05
From: England
Member No.: 19379



nope.
Go to the top of the page
+Quote Post
StealthX
post Apr 30 2014, 17:47
Post #757





Group: Members
Posts: 53
Joined: 7-December 11
Member No.: 95646



Is it possible to make this not put half of words on a line? Like say a line ends in the word 'publication' on here it might show 'publi' and then when I scroll down on puts the entire word on the next line, can I just make it not end any line with half words and just put the entire word on the next line?
Go to the top of the page
+Quote Post
ganon
post May 30 2014, 23:17
Post #758





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (marc2003 @ Dec 4 2013, 10:15) *
have a look at the server preferences. i think you can add other sources.

I just saw this, something I've always wanted to do...but don't know how. Please Help. Thanks.
Go to the top of the page
+Quote Post
mire777
post May 31 2014, 17:43
Post #759





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ May 31 2014, 00:17) *
QUOTE (marc2003 @ Dec 4 2013, 10:15) *
have a look at the server preferences. i think you can add other sources.

I just saw this, something I've always wanted to do...but don't know how. Please Help. Thanks.


Try ex. this: http://www.hydrogenaud.io/forums/index.php...st&p=841216

Save text as: lastfm_bio.vbs
Text: ''ENTER YOUR FOLDER'' replace with your custom folder where to save biography text.
Put this file in foobar main folder.
In preferences>tools>biography server>run external script -On ''command line'' write: cscript //U //nologo lastfm_bio.vbs "$meta(artist,0)"
Set character code to: UTF16.

Add ''run external script'' in source list, after last.fm.

Script use echonest.
Dont now if this still work, i don't use foo_uie_biography anymore.
Try..

This post has been edited by mire777: May 31 2014, 18:08
Go to the top of the page
+Quote Post
ganon
post Jun 2 2014, 22:15
Post #760





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ May 31 2014, 11:43) *
QUOTE (ganon @ May 31 2014, 00:17) *
QUOTE (marc2003 @ Dec 4 2013, 10:15) *
have a look at the server preferences. i think you can add other sources.

I just saw this, something I've always wanted to do...but don't know how. Please Help. Thanks.


Try ex. this: http://www.hydrogenaud.io/forums/index.php...st&p=841216

Save text as: lastfm_bio.vbs
Text: ''ENTER YOUR FOLDER'' replace with your custom folder where to save biography text.
Put this file in foobar main folder.
In preferences>tools>biography server>run external script -On ''command line'' write: cscript //U //nologo lastfm_bio.vbs "$meta(artist,0)"
Set character code to: UTF16.

Add ''run external script'' in source list, after last.fm.

Script use echonest.
Dont now if this still work, i don't use foo_uie_biography anymore.
Try..


Thanks. I did as you instructed above. Nothing happens. Where ''ENTER YOUR FOLDER'', custom folder, is with or without quotes...?

This post has been edited by ganon: Jun 2 2014, 22:31
Go to the top of the page
+Quote Post
mire777
post Jun 3 2014, 01:53
Post #761





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ Jun 2 2014, 23:15) *
QUOTE (mire777 @ May 31 2014, 11:43) *
QUOTE (ganon @ May 31 2014, 00:17) *
QUOTE (marc2003 @ Dec 4 2013, 10:15) *
have a look at the server preferences. i think you can add other sources.

I just saw this, something I've always wanted to do...but don't know how. Please Help. Thanks.


Try ex. this: http://www.hydrogenaud.io/forums/index.php...st&p=841216

Save text as: lastfm_bio.vbs
Text: ''ENTER YOUR FOLDER'' replace with your custom folder where to save biography text.
Put this file in foobar main folder.
In preferences>tools>biography server>run external script -On ''command line'' write: cscript //U //nologo lastfm_bio.vbs "$meta(artist,0)"
Set character code to: UTF16.

Add ''run external script'' in source list, after last.fm.

Script use echonest.
Dont now if this still work, i don't use foo_uie_biography anymore.
Try..


Thanks. I did as you instructed above. Nothing happens. Where ''ENTER YOUR FOLDER'', custom folder, is with or without quotes...?


With quotes, it looks like this: folder = "C:\foobar2000\biography"

It should work, i tested API it's ok.

Uups, sorry.
In tools>Biography Server: ''Run External Script'' should be first in list.
I tested with foo_uie_biography it works.

This post has been edited by mire777: Jun 3 2014, 02:06
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 06:42
Post #762





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Jun 2 2014, 19:53) *
QUOTE (ganon @ Jun 2 2014, 23:15) *
QUOTE (mire777 @ May 31 2014, 11:43) *
QUOTE (ganon @ May 31 2014, 00:17) *
QUOTE (marc2003 @ Dec 4 2013, 10:15) *
have a look at the server preferences. i think you can add other sources.

I just saw this, something I've always wanted to do...but don't know how. Please Help. Thanks.


Try ex. this: http://www.hydrogenaud.io/forums/index.php...st&p=841216

Save text as: lastfm_bio.vbs
Text: ''ENTER YOUR FOLDER'' replace with your custom folder where to save biography text.
Put this file in foobar main folder.
In preferences>tools>biography server>run external script -On ''command line'' write: cscript //U //nologo lastfm_bio.vbs "$meta(artist,0)"
Set character code to: UTF16.

Add ''run external script'' in source list, after last.fm.

Script use echonest.
Dont now if this still work, i don't use foo_uie_biography anymore.
Try..


Thanks. I did as you instructed above. Nothing happens. Where ''ENTER YOUR FOLDER'', custom folder, is with or without quotes...?


With quotes, it looks like this: folder = "C:\foobar2000\biography"

It should work, i tested API it's ok.

Uups, sorry.
In tools>Biography Server: ''Run External Script'' should be first in list.
I tested with foo_uie_biography it works.


OK, done as you said. I see the .txt files in my custom folder, but I thought this info would show up in the BIO in Foobar...maybe this is not what I've been looking for...also, it only downloads artist info not album...thx again for your help and any suggestions you may offer.
Go to the top of the page
+Quote Post
mire777
post Jun 3 2014, 11:36
Post #763





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ Jun 3 2014, 07:42) *
OK, done as you said. I see the .txt files in my custom folder, but I thought this info would show up in the BIO in Foobar...maybe this is not what I've been looking for...also, it only downloads artist info not album...thx again for your help and any suggestions you may offer.


Well you didnt set something right. It shows text in foobar panel.
You have other scripts for album somewhere. Here: http://www.hydrogenaud.io/forums/index.php...0955&st=625
Ask Romor for help..

This post has been edited by mire777: Jun 3 2014, 11:36
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 15:06
Post #764





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Jun 3 2014, 05:36) *
QUOTE (ganon @ Jun 3 2014, 07:42) *
OK, done as you said. I see the .txt files in my custom folder, but I thought this info would show up in the BIO in Foobar...maybe this is not what I've been looking for...also, it only downloads artist info not album...thx again for your help and any suggestions you may offer.


Well you didnt set something right. It shows text in foobar panel.
You have other scripts for album somewhere. Here: http://www.hydrogenaud.io/forums/index.php...0955&st=625
Ask Romor for help..


OK, thanks mire777. It works now with the link you gave me to Romor's comments. Now I need to find a way to do this with album info...and thx again for all your help. Much appreciated.
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 18:14
Post #765





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Aug 4 2013, 10:34) *
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
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


Hello again mire777. Do you have a similar script for album info...? The one for artist works just fine. Thanks
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 19:25
Post #766





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Aug 4 2013, 10:34) *
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
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


Hello again mire777. Do you have a similar script for album info...? The one for artist works just fine. Thanks.
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 19:51
Post #767





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Aug 4 2013, 10:34) *
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
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


Hello again mire777. Do you have a similar script for album info...? The one for artist works just fine. Thanks.
Go to the top of the page
+Quote Post
ganon
post Jun 3 2014, 19:53
Post #768





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Jun 3 2014, 05:36) *
QUOTE (ganon @ Jun 3 2014, 07:42) *
OK, done as you said. I see the .txt files in my custom folder, but I thought this info would show up in the BIO in Foobar...maybe this is not what I've been looking for...also, it only downloads artist info not album...thx again for your help and any suggestions you may offer.


Well you didnt set something right. It shows text in foobar panel.
You have other scripts for album somewhere. Here: http://www.hydrogenaud.io/forums/index.php...0955&st=625
Ask Romor for help..


Everything works fine now. Just need to know if there is a similar script for additional album info...
Go to the top of the page
+Quote Post
mire777
post Jun 3 2014, 20:38
Post #769





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ Jun 3 2014, 20:25) *
Hello again mire777. Do you have a similar script for album info...? The one for artist works just fine. Thanks.


Yes. Try this, script works with last.fm API. As i remmember, should be better than default - has more info.
Shows Album tracks also.

CODE
DisplayAlbumTracks = 1

Set ARG = WScript.Arguments

If ARG.Count <> 2 Then
  WScript.Echo "Usage: cscript //nologo lastfm_album.vbs ""%artist%"" ""%title%"""
  WScript.Quit()
Else
  If Arg(0) <> "?" And Arg(1) <> "?" Then
  LfmInfo ARG(0), ARG(1)
End If
End If

Function LfmInfo(artist, track)
  Set XML = CreateObject("MSXML2.DOMDocument.6.0")
  ws = "http://ws.audioscrobbler.com/2.0/?method="
  api = StrReverse("9c8f955632698c23323d4b2c7a77030") & Chr(100) : q = Chr(34)

  XML.loadXML(Request(ws & "track.getinfo&api_key=" &_
  api & "&artist=" & artist & "&track=" & track))
  Set X = XML.selectSingleNode("lfm/track/album/title")
    If Not X Is Nothing Then album = X.text : rel = "Artist: " & q & artist & q & vbCrLf & "Album: " & q & album & q & vbCrLf End If
  Set X = XML.selectSingleNode("lfm/track/mbid")
    If Not X Is Nothing Then track_mbid = X.text End If
  Set X = XML.selectSingleNode("lfm/track/artist/mbid")
    If Not X Is Nothing Then artist_mbid = X.text End If


    If album <> "" Then
    XML.loadXML(Request(ws & "album.getinfo&api_key=" &_
    api & "&artist=" & artist & "&album=" & album))
    Set X = XML.selectSingleNode("lfm/album/mbid")
    If Not X Is Nothing Then album_mbid = X.text End If
    Set X = XML.selectSingleNode("lfm/album/releasedate")
    If Not X Is Nothing Then
      If X.text <> "" Then
        rel = Left(rel, Len(rel)-2) & vbCrLf & "Released on " & Mid(X.text, 1, InStr(X.text, ",")-1) & vbCrLf
      End If
      End If
    Set X = XML.selectSingleNode("lfm/album/wiki/content")
    If Not X Is Nothing Then
      If X.text <> "" Then rel = rel & vbCrLf & "ALBUM INFO:" & vbCrLf & DropHtml(X.text) & vbCrLf End If
     End If
     End If

  If DisplayAlbumTracks Then
    Set X = XML.selectNodes("lfm/album/tracks/track")
    If Not X Is Nothing Then
      For Each t In X
        If LCase(track) = LCase(t.selectSingleNode("name").text) Then p = "*" Else p = "  " End If
        trklst = trklst & p & Space(Len(t.getAttribute("rank")) mod 2) & t.getAttribute("rank") & ". " &_
        t.selectSingleNode("name").text & vbCrLf
      Next
    If trklst <> "" Then trklst = "ALBUM TRACKLIST: " & vbCrLf & trklst End If
    End If
    End If

  If DisplayAlbumTracks Then rel = rel & vbCrLf & trklst End If
  WScript.Echo "" & rel

End Function

Function DropHtml(s)
  Set HTML = CreateObject("HtmlFile")
  HTML.write s
  DropHtml = HTML.body.innerText
End Function

Function Request(url)
  Set HTTP = CreateObject("MSXML2.ServerXMLHTTP")
  HTTP.open "GET", url, 0
  HTTP.send ""
  If Err.number <> 0 then
   WScript.Echo "Error: " & HTTP.parseError.url & vbCrLf & HTTP.parseError.Reason
   WScript.Quit()
End If
  Request = HTTP.responseText
End Function


Save this as ''lastfm_album.vbs''.
Put script in main foobar folder.

Go to Preferences>tools>Run External Script>Album
On Command line enter this text:

cscript //nologo lastfm_album.vbs "%artist%" "%title%"

Set Character Code to: utf8
Click ''Add New'' > Apply.

In Preferences>Tools>Biography server
''Run External Script'' should be first in list.

I can't test this, i'm on work now.
So, Try it yourself.

This post has been edited by mire777: Jun 3 2014, 20:40
Go to the top of the page
+Quote Post
ganon
post Jun 4 2014, 15:21
Post #770





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Jun 3 2014, 14:38) *
QUOTE (ganon @ Jun 3 2014, 20:25) *
Hello again mire777. Do you have a similar script for album info...? The one for artist works just fine. Thanks.


Yes. Try this, script works with last.fm API. As i remmember, should be better than default - has more info.
Shows Album tracks also.

CODE
DisplayAlbumTracks = 1

Set ARG = WScript.Arguments

If ARG.Count <> 2 Then
  WScript.Echo "Usage: cscript //nologo lastfm_album.vbs ""%artist%"" ""%title%"""
  WScript.Quit()
Else
  If Arg(0) <> "?" And Arg(1) <> "?" Then
  LfmInfo ARG(0), ARG(1)
End If
End If

Function LfmInfo(artist, track)
  Set XML = CreateObject("MSXML2.DOMDocument.6.0")
  ws = "http://ws.audioscrobbler.com/2.0/?method="
  api = StrReverse("9c8f955632698c23323d4b2c7a77030") & Chr(100) : q = Chr(34)

  XML.loadXML(Request(ws & "track.getinfo&api_key=" &_
  api & "&artist=" & artist & "&track=" & track))
  Set X = XML.selectSingleNode("lfm/track/album/title")
    If Not X Is Nothing Then album = X.text : rel = "Artist: " & q & artist & q & vbCrLf & "Album: " & q & album & q & vbCrLf End If
  Set X = XML.selectSingleNode("lfm/track/mbid")
    If Not X Is Nothing Then track_mbid = X.text End If
  Set X = XML.selectSingleNode("lfm/track/artist/mbid")
    If Not X Is Nothing Then artist_mbid = X.text End If


    If album <> "" Then
    XML.loadXML(Request(ws & "album.getinfo&api_key=" &_
    api & "&artist=" & artist & "&album=" & album))
    Set X = XML.selectSingleNode("lfm/album/mbid")
    If Not X Is Nothing Then album_mbid = X.text End If
    Set X = XML.selectSingleNode("lfm/album/releasedate")
    If Not X Is Nothing Then
      If X.text <> "" Then
        rel = Left(rel, Len(rel)-2) & vbCrLf & "Released on " & Mid(X.text, 1, InStr(X.text, ",")-1) & vbCrLf
      End If
      End If
    Set X = XML.selectSingleNode("lfm/album/wiki/content")
    If Not X Is Nothing Then
      If X.text <> "" Then rel = rel & vbCrLf & "ALBUM INFO:" & vbCrLf & DropHtml(X.text) & vbCrLf End If
     End If
     End If

  If DisplayAlbumTracks Then
    Set X = XML.selectNodes("lfm/album/tracks/track")
    If Not X Is Nothing Then
      For Each t In X
        If LCase(track) = LCase(t.selectSingleNode("name").text) Then p = "*" Else p = "  " End If
        trklst = trklst & p & Space(Len(t.getAttribute("rank")) mod 2) & t.getAttribute("rank") & ". " &_
        t.selectSingleNode("name").text & vbCrLf
      Next
    If trklst <> "" Then trklst = "ALBUM TRACKLIST: " & vbCrLf & trklst End If
    End If
    End If

  If DisplayAlbumTracks Then rel = rel & vbCrLf & trklst End If
  WScript.Echo "" & rel

End Function

Function DropHtml(s)
  Set HTML = CreateObject("HtmlFile")
  HTML.write s
  DropHtml = HTML.body.innerText
End Function

Function Request(url)
  Set HTTP = CreateObject("MSXML2.ServerXMLHTTP")
  HTTP.open "GET", url, 0
  HTTP.send ""
  If Err.number <> 0 then
   WScript.Echo "Error: " & HTTP.parseError.url & vbCrLf & HTTP.parseError.Reason
   WScript.Quit()
End If
  Request = HTTP.responseText
End Function


Save this as ''lastfm_album.vbs''.
Put script in main foobar folder.

Go to Preferences>tools>Run External Script>Album
On Command line enter this text:

cscript //nologo lastfm_album.vbs "%artist%" "%title%"

Set Character Code to: utf8
Click ''Add New'' > Apply.

In Preferences>Tools>Biography server
''Run External Script'' should be first in list.

I can't test this, i'm on work now.
So, Try it yourself.


Many thanks, however, I'm getting the following error: "Cscript error: execution of the Windows script host failed. (Not enough storage is available to complete this operation.)" Please advise...

Edit: Got it working now, but it's showing the wrong album in almost every track I play. Also in some it just gives the album name and tracks and nothing more...

Edit: This not entirely true...it takes more than 15 secs. to show the album info, and it will only show the right info when the 2nd track is played. Also, the track names have to be exactly as they appear on the album. If I had a comment in brackets beside the track name, then the script can't find the album...it seems this boils down to a tagging issue, but the 2nd track thing must be something in the script...

This post has been edited by ganon: Jun 4 2014, 16:00
Go to the top of the page
+Quote Post
mire777
post Jun 4 2014, 17:50
Post #771





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ Jun 4 2014, 16:21) *
Many thanks, however, I'm getting the following error: "Cscript error: execution of the Windows script host failed. (Not enough storage is available to complete this operation.)" Please advise...

Edit: Got it working now, but it's showing the wrong album in almost every track I play. Also in some it just gives the album name and tracks and nothing more...

Edit: This not entirely true...it takes more than 15 secs. to show the album info, and it will only show the right info when the 2nd track is played. Also, the track names have to be exactly as they appear on the album. If I had a comment in brackets beside the track name, then the script can't find the album...it seems this boils down to a tagging issue, but the 2nd track thing must be something in the script...


Script check for albums by %artist% %track%.
On command line write this: cscript //nologo lastfm_album.vbs "%artist%" "%album%"
If you have problem with track names, this is problem by you> But if you have correctly tagged %album% field it will show exactly album then.
If on last.fm you don't have text for this album then it will only show tracks.
2nd track thing is probably problem with foo_uie_biography itself not in script(slow internet acces etc.. , or something not set right), because i always receive album info i cant reproduce this behavior..
Go to the top of the page
+Quote Post
ganon
post Jun 4 2014, 18:28
Post #772





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (mire777 @ Jun 4 2014, 11:50) *
QUOTE (ganon @ Jun 4 2014, 16:21) *
Many thanks, however, I'm getting the following error: "Cscript error: execution of the Windows script host failed. (Not enough storage is available to complete this operation.)" Please advise...

Edit: Got it working now, but it's showing the wrong album in almost every track I play. Also in some it just gives the album name and tracks and nothing more...

Edit: This not entirely true...it takes more than 15 secs. to show the album info, and it will only show the right info when the 2nd track is played. Also, the track names have to be exactly as they appear on the album. If I had a comment in brackets beside the track name, then the script can't find the album...it seems this boils down to a tagging issue, but the 2nd track thing must be something in the script...


Script check for albums by %artist% %track%.
On command line write this: cscript //nologo lastfm_album.vbs "%artist%" "%album%"
If you have problem with track names, this is problem by you> But if you have correctly tagged %album% field it will show exactly album then.
If on last.fm you don't have text for this album then it will only show tracks.
2nd track thing is probably problem with foo_uie_biography itself not in script(slow internet acces etc.. , or something not set right), because i always receive album info i cant reproduce this behavior..


Ok, thx. "Script check for albums by %artist% %track%". -here, am I supposed to replace certain line(s) in the script...?
Go to the top of the page
+Quote Post
ganon
post Jun 5 2014, 02:09
Post #773





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (ganon @ Jun 4 2014, 12:28) *
QUOTE (mire777 @ Jun 4 2014, 11:50) *
QUOTE (ganon @ Jun 4 2014, 16:21) *
Many thanks, however, I'm getting the following error: "Cscript error: execution of the Windows script host failed. (Not enough storage is available to complete this operation.)" Please advise...

Edit: Got it working now, but it's showing the wrong album in almost every track I play. Also in some it just gives the album name and tracks and nothing more...

Edit: This not entirely true...it takes more than 15 secs. to show the album info, and it will only show the right info when the 2nd track is played. Also, the track names have to be exactly as they appear on the album. If I had a comment in brackets beside the track name, then the script can't find the album...it seems this boils down to a tagging issue, but the 2nd track thing must be something in the script...


Script check for albums by %artist% %track%.
On command line write this: cscript //nologo lastfm_album.vbs "%artist%" "%album%"
If you have problem with track names, this is problem by you> But if you have correctly tagged %album% field it will show exactly album then.
If on last.fm you don't have text for this album then it will only show tracks.
2nd track thing is probably problem with foo_uie_biography itself not in script(slow internet acces etc.. , or something not set right), because i always receive album info i cant reproduce this behavior..


Ok, thx. "Script check for albums by %artist% %track%". -here, am I supposed to replace certain line(s) in the script...?


Please disregard my comment above. Thx
Go to the top of the page
+Quote Post
ganon
post Jun 5 2014, 02:49
Post #774





Group: Members
Posts: 31
Joined: 23-December 13
From: Peru
Member No.: 113500



QUOTE (ganon @ Jun 4 2014, 20:09) *
QUOTE (ganon @ Jun 4 2014, 12:28) *
QUOTE (mire777 @ Jun 4 2014, 11:50) *
QUOTE (ganon @ Jun 4 2014, 16:21) *
Many thanks, however, I'm getting the following error: "Cscript error: execution of the Windows script host failed. (Not enough storage is available to complete this operation.)" Please advise...

Edit: Got it working now, but it's showing the wrong album in almost every track I play. Also in some it just gives the album name and tracks and nothing more...

Edit: This not entirely true...it takes more than 15 secs. to show the album info, and it will only show the right info when the 2nd track is played. Also, the track names have to be exactly as they appear on the album. If I had a comment in brackets beside the track name, then the script can't find the album...it seems this boils down to a tagging issue, but the 2nd track thing must be something in the script...


Script check for albums by %artist% %track%.
On command line write this: cscript //nologo lastfm_album.vbs "%artist%" "%album%"
If you have problem with track names, this is problem by you> But if you have correctly tagged %album% field it will show exactly album then.
If on last.fm you don't have text for this album then it will only show tracks.
2nd track thing is probably problem with foo_uie_biography itself not in script(slow internet acces etc.. , or something not set right), because i always receive album info i cant reproduce this behavior..


Ok, thx. "Script check for albums by %artist% %track%". -here, am I supposed to replace certain line(s) in the script...?


Please disregard my comment above. Thx


No change with your suggestions above. Still returning the wrong album...seems to me, the script is still looking first at the track, then looking for the first album it finds the track in. So, it return "Compilations", or "Greatest Hits", or "The Best of...", etc. where it finds the track, but it's hardly ever the album I have in the tag...also, obviously if the next track is not in the previous album it returns the next album it finds, but never the one in the tag, with a few exceptions of course, those being albums whose artists don't have "Compilations," or "Best of..." etc...
Go to the top of the page
+Quote Post
mire777
post Jun 5 2014, 08:29
Post #775





Group: Members
Posts: 350
Joined: 9-June 12
Member No.: 100550



QUOTE (ganon @ Jun 5 2014, 03:49) *
No change with your suggestions above. Still returning the wrong album...seems to me, the script is still looking first at the track, then looking for the first album it finds the track in. So, it return "Compilations", or "Greatest Hits", or "The Best of...", etc. where it finds the track, but it's hardly ever the album I have in the tag...also, obviously if the next track is not in the previous album it returns the next album it finds, but never the one in the tag, with a few exceptions of course, those being albums whose artists don't have "Compilations," or "Best of..." etc...


Ok seems that this metod not work for you, and it's waste of time to modify script.
So try this: http://pastebin.com/a5s7PSNn

Save text as: allmusic.vbs
Put file in main foobar folder.
Set character code(ANSI) - (if you later get a problem with some text characters, change this to UTF8 or UTF16)
On command line write this: cscript //nologo allmusic.vbs "%album artist%" "%album%" review|bio

This is Romor's script that can be used to display artist biography and album review according to allmusic.com

This post has been edited by mire777: Jun 5 2014, 08:29
Go to the top of the page
+Quote Post

32 Pages V  « < 29 30 31 32 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st August 2014 - 06:21