Le dimanche 2 janvier 2011 18:40:30, Todd Nix a écrit :
> Bonjour Romain -

Bonjour!

> It's not a documented standard - but a standard in practice.
> 
> If you pull up any shoutcast/icecast stream using winamp or other players
> you  will see that they parse it and display it as Artist and Title
> separately.
> 
> I've seen this discussed on the MPD bug trackers also - for a while they
> had an  issue where they had artist and title reversed so that clients
> were parsing it into the wrong fields. MPD eventually patched it to list
> the SONG field as "Artist - Title".

I am not worried by the order because if push comes to shove, I'll add a 
setting for it. I am, however, concernend by the escaping issue: if I parse an 
a 
regexp like: [^-]+\s-\s[^-]+ then for instance anything mentioning Antoine de 
Saint-
Exupéry will not work..

Icecast's relay code for shoutcast just puts everything in the title field, 
that is  probably where I got the current solution:
static void filter_shoutcast_metadata (source_t *source, char *metadata, 
unsigned int meta_len)
{
    if (metadata)
    {
        char *end, *p;
        int len;

        do
        {
            metadata++;
            if (strncmp (metadata, "StreamTitle='", 13))
                break;
            if ((end = strstr (metadata+13, "\';")) == NULL)
                break;
            len = (end - metadata) - 13;
            p = calloc (1, len+1);
            if (p)
            {
                memcpy (p, metadata+13, len);
                logging_playlist (source->mount, p, source->listeners);
                stats_event_conv (source->mount, "title", p, 
source->format->charset);
                yp_touch (source->mount);
                free (p);
            }
        } while (0);
    }
}


Do you know any convention concerning this issue ??

Romain

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to