Hi, I would like to know how to create a dynamic xml playlist that is automatically updated as mp3 files are uploaded. I want the playlist for flabell29 flash mp3 player, which can be found at flabell.com. The playlist icludes album art location, artist name, track title, duration, album title and a web link. The mp3 info should be read from a txt file

From this example file I see there is a tracks block in which you have to insert each mp3 data:

    <item id="11">
        <![CDATA[ Mix Track 2 ]]>
        <![CDATA[ feat. Eo ]]>
        if you want this item to have a different artist(for example featuring artist write the text in this tag
        define this only if is the correct duration, otherwise it will make the song to jump incorrectly
        <buy price="0.99" url="http://www.flabell.com" target="_blank">Buy</buy>
        if you want this item to have a different text then the general text, write the text in this tag if the url is empty then the button won't appear
        if you want to use RTMP streaming use this "song" tag like below
        <song streamer = "rtmp://domain.com/app/">mp3:streamPath</song>

The parent block is used to determine the album details:

    <albums startAlbumNo="">
        <album id="1">
            <image>content/images/albums/50 Cent.jpg</image>
            <name alsoInList="true">...</name>
            <buy price="9.99" target="">http://www.themesbell.com</buy>

In order to add a song to an album you have to add an item block to tracks. From what I see in the linked file, each item has an id number and this cannot be repeated not even into another album of the same xml file, or at least this is what I see from this example. This is a bit strange behaviour, I would expect to reset the item counter id when starting a new album entry. It's a bit like a primary key of a table, unique and almost always incremental.

The xml output is not difficult to create with SimpleXML library and glob() function or through a database query, but check if there is a specification about the format of mp3gallery.xml file. I cannot find anything in the public part.

So, do you have a database table in which you save data (album details, mp3 filenames, ...)? And if yes paste here table structure and an example of data, you can use explain table_name in the MySQL client. The uploaded mp3 are saved into separated directories? Have you written some code? The more information you provide, the more helpful we can be. Bye!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.