summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-15 14:31:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-15 14:31:01 +0000
commit4f58f6197d8aba3ddbb6976521ea9f814ae1738d (patch)
tree74ba582ef9f74473dbc41b2a3c66c04af25bc9b3
parent6828b8791a9a165e1cd9d2694a38510343d58d0e (diff)
downloadrockbox-4f58f6197d8aba3ddbb6976521ea9f814ae1738d.zip
rockbox-4f58f6197d8aba3ddbb6976521ea9f814ae1738d.tar.gz
rockbox-4f58f6197d8aba3ddbb6976521ea9f814ae1738d.tar.bz2
rockbox-4f58f6197d8aba3ddbb6976521ea9f814ae1738d.tar.xz
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
-rw-r--r--apps/playlist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 7b1ec59..2e21aef 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++;