PDA

View Full Version : Artist's biography plugin



Craig, James (IT)
2005-02-04, 05:30
I think it will probably work for most people I'm just behind a work
proxy here
I tried Dot Allison, Franz Ferdinand & David Byrne (I still only have 3
mp3s at work ha ha) and certainly FF have an allmusic page.
I believe one needs to explicity specify the proxy, something like this;

sub initUserAgent {
my $proxy = Slim::Utils::Prefs::get('webproxy');
$lastfm_ua = LWP::UserAgent->new();
$lastfm_ua->timeout(5);
if ($proxy) {
$lastfm_ua->proxy('http', "http://$proxy");
}
}

This is a cool plugin because you'll be able to look up new artists you
don't know that pop up on internet radio!

The thought occurs that many people must be setting up their own
UserAgents in plugins.
I wonder is there a generic SlimServer one we can use that will do the
proxy etc automatically?

James

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Michael
Herger
Sent: 04 February 2005 12:23
To: Slim Devices Discussion
Subject: [slim] Artist's biography plugin

> This looks cool but;
> A) The plugin crashes SlimServer if you don't have a client running.
> Can't call method "master" on an undefined value at
> /PerlApp/Slim/Player/Sync.pm line 386.

Thanks, I'll fix this!

> B) I don't seem to be getting any data from Allmusic
> The page just says the artist's name and "information provided by
> allmusic". Have tried a few different ones.

Who is it? I know this can happen if there's not even an artist close to

the one you're looking for. Could you please go to www.allmusic.com and

check whether you find him manually? Are your files properly tagged? I'm

only looking for the artist tag and, if it does not exist (eg. online
streaming), the title tag.

> Are you using the configured proxy server because it takes a while to
> generate the page.

Interesting question... don't think if LWP::UserAgent does not recognize

it automatically. I will have a look at it (will have to install a proxy

first :-/).

> Some errors caused here...
> Use of uninitialized value in pattern match (m//) at C:/Program
> Files/SlimServer/server/Plugins/Biography/Plugin.pm line
> 242.
> Use of uninitialized value in regexp compilation at C:/Program
> Files/SlimServer/server/Plugins/Biography/Plugin.pm line
> 248.

I've seen these two as well, but did not yet pay too much attention to
them as they were never show stoppers on my two machines.

Thanks for the feedback. I guess I was a little optimistic with
releaseing
a 0.1 :-).

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

mherger
2005-02-04, 05:43
> I think it will probably work for most people I'm just behind a work
> proxy here
> I tried Dot Allison, Franz Ferdinand & David Byrne (I still only have 3

Not really exotic stuff.

> mp3s at work ha ha) and certainly FF have an allmusic page.

Should work with some streams, too. Tried Radio Paradise and StarStream
(ShoutCast).

> I believe one needs to explicity specify the proxy, something like this;

Thanks! In the meantime I added the following on line ~218:

$ua->proxy('http', 'http://' . Slim::Utils::Prefs::get('webproxy')) if
(Slim::Utils::Prefs::get('webproxy'));

Seems pretty similar to me...

[..]
> The thought occurs that many people must be setting up their own
> UserAgents in plugins.

At least four of mine do... And I never cared about proxies. :-/

> I wonder is there a generic SlimServer one we can use that will do the
> proxy etc automatically?

Not that I knew.

Thanks a lot for point the proxy problem out!

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)