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.tar.gz
rockbox-4f58f6197d8aba3ddbb6976521ea9f814ae1738d.zip
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 7b1ec5990a..2e21aef717 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -146,8 +146,16 @@ void add_indices_to_playlist( playlist_info_t *playlist )
146 { 146 {
147 store_index = 1; 147 store_index = 1;
148 } 148 }
149 else if((*p == '#') && store_index)
150 {
151 /* If the first character on a new line is a hash
152 sign, we treat it as a comment. So called winamp
153 style playlist. */
154 store_index = 0;
155 }
149 else if(store_index) 156 else if(store_index)
150 { 157 {
158
151 /* Store a new entry */ 159 /* Store a new entry */
152 playlist->indices[ playlist->amount ] = i+count; 160 playlist->indices[ playlist->amount ] = i+count;
153 playlist->amount++; 161 playlist->amount++;