Hi,

It really looks like implementing a protocol would be the best
solution, at least in a first time.

On 9/1/07, Romain Beauxis <[EMAIL PROTECTED]> wrote:
uld be able to have different login, hence multiple last
> streams at once..
> Is something like:
> lastfm://user:[EMAIL PROTECTED] doable ?

This would mean one session per request, i.e. one session per track.
Is that fine ? Or maybe you could cache currently opened sessions for
a given user, and re-use them... That seems right.

> In facts, that's currently what I've been doing so far..
> The only thing I see is how we should implement metadatas, since they are
> passed along with the file, but there are no id tags in the file..

A "lastfm:..." request would be passed to the "resolve" function of
the lastFM protocol. This would trigger a playlist download, the
parsing of the playlist, from which you get the file URI and the
metadata. You can now rewrite the initial URI into a new one, using a
similar code than in annotate.ml:
 [Request.indicator ~metadata:(Utils.hashtbl_of_list metadata) file_uri]
This attaches the metadata to the new URI, which will then be resolved
(by the HTTP protocol in your case).

> These functions can be seen as completely disconnected, we may implement them
> later..

Cool.
-- 
David

Répondre à