FS#7652 - EXTM3U support
EXTM3U is a format based on the standard m3u format. It adds a comment line before filename in .m3u or .m3u8 file in the format of
where xxx is track length in seconds, yyy is the title.
For more info, see: http://hanna.pyxidis.org/tech/m3u.html
Supporting EXTM3U format has several potential benefits:
1. Instead of displaying filenames, track title and length can easily be viewed when viewing playlist (currently I think there is a patch that does it by opening each file).
2. Length of playlist can be readily calculated by summing, which can have some interesting applications such as finding how much time is left in current playlist. (Currently this is not possible yet with this patch, but I'm still thinking of possible solutions).
Of course, you have to have playlists in EXTM3U format to get the benefits. There are widely available tools to generate EXTM3U or add information to existing normal m3u playlists. In the future I might add functionality to Rockbox to save EXTM3U playlists (only if database is enabled and ready) or a plugin.
The current patch is able to parse EXTM3U information and use it in playlist viewer. To see it work, you have to set your track display option in the playlist menu to display EXTM3U information; otherwise, filename will be displayed. Two display options are added: title only and title plus track length.
This patch should have very minimal impact on normal playlist usage. A parse function and a few booleans values to existing structures are added, but the parsed title and filename share the same buffer (since they won't be displayed at the same time). Specifically, beside a quick initial reading of header to determine if a playlist is EXTM3U and a few boolean checks, current playlist parsing/viewing routines are not changed if playlist is not EXTM3U or EXTM3U information is not needed for display.
Enough of me babbling :D Here is the patch. I did some limited testing, so it probably is not foul-proof yet.
This task depends upon