From 4f58f6197d8aba3ddbb6976521ea9f814ae1738d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 15 Jun 2002 14:31:01 +0000 Subject: the playlist loader now ignores lines that start with # as they are meant to be "comments" and other secret magic stuff added by winamp etc git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1016 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/playlist.c b/apps/playlist.c index 7b1ec5990a..2e21aef717 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -146,8 +146,16 @@ void add_indices_to_playlist( playlist_info_t *playlist ) { store_index = 1; } + else if((*p == '#') && store_index) + { + /* If the first character on a new line is a hash + sign, we treat it as a comment. So called winamp + style playlist. */ + store_index = 0; + } else if(store_index) { + /* Store a new entry */ playlist->indices[ playlist->amount ] = i+count; playlist->amount++; -- cgit v1.2.3