[vlc-devel] Re: [PATCH] m3u playlist import and export, version 2

Derk-Jan Hartman hartman at videolan.org
Sat Aug 13 03:01:48 CEST 2005


On 12 aug 2005, at 16:24, Christophe Mutricy wrote:

> On Wed, Aug 10, 05 at 12:39 +0200, Daniel Stränger wrote:
>
>> Hi!
>> I forgot to free psz_author in the first patch version.
>> This mail comes with the corrected patch.
>>
> Applied (r12139).
>
> A few modifications:
>     the strnlen is a bit over-cautious as stream_ReadLine always
> return a "\0" finished string and strnlen doesn't exist on windows.
>         in the output module, we need to count the backslases as  
> well as
> the commas.

This patch breaks things. If you have a m3u WITHOUT an artist, it  
puts the title into the artist field. UNACCEPTABLE.

>> hi all!
>> i've recognized that loading and saving a m3u playlist does not  
>> use the
>> same EXTINF format.
>> In 0.8.1 the playlist entry's extra information was saved as:
>>   #EXTINF:time,artist,name
>> Now, in 0.8.2 it's saved as:
>>   #EXTINF:time,artist - name
>>
>> but during the load of a playlist and parsing the EXTINF-line the  
>> part of the artist was neglected.
>> i've corrected this misbehavior as follows:
>>   * The delimiter character between time, artist and title is the  
>> comma!

Says who?
"The problem about using EXTINF data as title is that such data is  
unstructured and unreliable. There is no formal m3u standard to  
specify what should go after the duration data on an EXTINF line -  
the consensus is that the data should be considered as 'display title'.

Therefore different m3u generators put different types of data there  
- either strings in the format 'artist - title' (or vice versa), or  
just the title, or simply the filename. All of this may be acceptable  
when simply displaying the data as it's human readable"

As far as I'm concerned the EXTINF should not even contain the artist  
information. And definitely not with ',' as a delimiter. We should  
store it in a VLC specific way if you ask me.

>>   * If the artist contains a comma, the comma is escaped by a  
>> backslash during export
>>   * of course the newly introduced escape charater "backslash"  
>> will also be escaped
>>   * in the Demux-function the artist *and* the title are parsed  
>> and handled separatly
>>   * the artist will be unescaped and set by vlc_input_item_AddInfo()
>>
>> the patch file comes as attachment and i hope you check it in to  
>> svn tree after revision.


-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list