On Tue, Dec 19, 2006 at 07:40:57PM +0100, Michael Ablassmeier wrote:
> heya again,

Hello, and sorry for the somewhat late reply - I was a bit offline for
the holidays :\  Thanks for the patience!

> On Tue, Dec 19, 2006 at 07:25:28PM +0100, Romain Beauxis wrote:
> > Le mardi 19 d?cembre 2006 17:39, Michael Ablassmeier a ?crit :
> > > hi,
> > 
> >     Hi !
> > 
> > > hm, well, imho the manpage says it clearly:
> > >
> > >  [..]
> > >   Also, the submit method requires that the following configuration
> > >   parameters be set for this "Audio::Scrobbler" object:
> > >
> > >      * username
> > >            The username of the user's AudioScrobbler registration.
> > >
> > >      * password
> > >            The password for the AudioScrobbler registration.
> > 
> > That's precisly what I was talking about, when I was testing the
> > perl module, submit failed when password was passed only at submit
> > function, I had to pass it at the constructor too.

Exactly - that's how it is intended to be - the Audio::Scrobbler object
should be initialized once, in the constructor, with all the parameters
that are *not* supposed to change for the foreseeable future.  The point
is that the username and password are passed once, to the constructor,
and then the submit() function may be invoked more than once - and
since, in the common case, it makes little or no sense to pass a
*different* set of credentials at each track submission, submit() only
uses the values set by the constructor.

That's what the "set for this Audio::Scrobbler object" part means; maybe
I should have added an "already" somewhere in there, to make things
clearer.

> > In the helper example, it seems that the paramaters passed to the
> > constructor and submit are the same...

Aye, it was easier that way :\  Unfortunately, it seems that "easier" is
not really the same as "most helpful" :)  Sorry about that.

> hmkey, this patch should make it work either way:
[snip patch allowing the password to be passed to submit(), too]

Well, the patch does what it is intended to do, but... as I explained
above, this is not the way things are meant to be :\  The password
should be initialized in the constructor.

I'm about to (finally) release a 0.02 version Real Soon Now(tm), with
better documentation and actual queueing of updates in case a submission
fails.  Thus, the idea of only initializing the constant parameters
once: when sending queued tracks, submit() will be invoked many times in
succession, and the username and password will only be specified once.

> > > the package ships /usr/bin/scrobbler-helper, you might want to have a
> > > look at this one. Example config is shipped aswell. Im going to add a
> > > pointer to this script in README.Debian.
> > 
> > Yes, but this script is very difficult to understand since the
> > option array is never explicitly stated. For instance I had to go
> > through the specs online to guess a correct progname and progversion
> > (mandatory)..
> > 
> > Here is a simple example that works for for me (c):
> 
> im going to add a sample script. Lets give upstream some days to sort
> out those issues first, if this doesnt happen in a foreseable time im
> going to add patches.

Hmm, I'll try to make things clearer in that regard in version 0.02,
too.

Once again, thanks for the problem reports and the patience and sorry
for the slow reply!

G'luck,
Peter

-- 
Peter Pentchev  [EMAIL PROTECTED]    [EMAIL PROTECTED]    [EMAIL PROTECTED]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
"yields falsehood, when appended to its quotation." yields falsehood, when 
appended to its quotation.

Attachment: pgp6pFOJKM66O.pgp
Description: PGP signature

Reply via email to