Patch #5770 by Dominik Riebeling: Skip BOM in playlists. Add '.m3u8' as a supported playlist extension.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10917 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2006-09-10 10:59:51 +00:00
parent a4858cfa1c
commit e605786b2a
2 changed files with 9 additions and 0 deletions

View file

@ -501,6 +501,14 @@ static int add_indices_to_playlist(struct playlist_info* playlist,
p = (unsigned char *)buffer;
/* utf8 BOM at beginning of file? */
if(i == 0 && nread > 3
&& *p == 0xef && *(p+1) == 0xbb && *(p+2) == 0xbf) {
nread -= 3;
p += 3;
i += 3;
}
for(count=0; count < nread; count++,p++) {
/* Are we on a new line? */

View file

@ -106,6 +106,7 @@ const struct filetype filetypes[] = {
{ "sid", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
#endif
{ "m3u", TREE_ATTR_M3U, Icon_Playlist, LANG_PLAYLIST },
{ "m3u8", TREE_ATTR_M3U, Icon_Playlist, LANG_PLAYLIST },
{ "cfg", TREE_ATTR_CFG, Icon_Config, VOICE_EXT_CFG },
{ "wps", TREE_ATTR_WPS, Icon_Wps, VOICE_EXT_WPS },
#ifdef HAVE_REMOTE_LCD