bongo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bongo-devel] Re: URI mplayer question


From: Dieter Deyke
Subject: Re: [bongo-devel] Re: URI mplayer question
Date: Wed, 21 Feb 2007 09:14:35 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (windows-nt)

Another way to solve the mplayer -playlist problem would be to resolve
playlists coming from urls in Bongo, and just pass song references to
the backend. If we would add some more of the do-what-i-mean logic,
then 'i f', 'i d', 'i t', and 'i l' could all become the same, handled
by some smarter insert function. I am not good at emacs lisp, but let
me show you some pseudo code of what I mean:

def bongo-insert-item(uri-or-filename, OPTIONAL title):
    if not title:
        title = remove-extension(basename(uri-or-filename))
    if is-a-playlist(uri-or-filename):
        insert-section-header-line(title)
        pl = fetch-playlist(uri-or-filename)
        for each item in pl:
            bongo-insert-item(item)
    elif is-a-directory(uri-or-filename):
        insert-section-header-line(title)
        d = list-directory(uri-or-filename)
        for each item in d:
            bongo-insert-item(item)
    else:
        insert-into-current-section(uri-or-filename, title)

The idea here is that remote playlists are handled like local ones.
They get expanded by Bongo. A local playlist can be determined by
looking at the extension (.m3u, .pls, .asx). A remote playlist could
be determined by extension or by mime-type. To read remote playlist
Bongo would either need some networking code, or it could make use of
wget.

What do you think about this approach?
-- 
Dieter Deyke

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]