diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-25 20:26:08 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-25 20:26:08 +0200 |
commit | 290c8fe11dc67b0ef04b605355ad3d4a455c6c15 (patch) | |
tree | c819bdb56df54c64f56040c5443524c1b41f4012 /plugins | |
parent | 4340b34f34a8a2d8d430ec343ab0e859e0fed374 (diff) |
m3u: fixed reading pls files which have spaces before and/or after the "=" sign
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/m3u/m3u.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/m3u/m3u.c b/plugins/m3u/m3u.c index 56602c4c..ff3320b5 100644 --- a/plugins/m3u/m3u.c +++ b/plugins/m3u/m3u.c @@ -322,16 +322,9 @@ load_pls (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pab } const uint8_t *e; int n; - if (!strncasecmp (p, "numberofentries=", 16) || !strncasecmp (p, "version=", 8)) { - while (p < end && *p >= 0x20) { - p++; - } - continue; - } - else if (!strncasecmp (p, "file", 4)) { + if (!strncasecmp (p, "file", 4)) { int idx = atoi (p + 4); if (uri[0] && idx != lastidx && lastidx != -1) { - trace ("uri%d\n", idx); DB_playItem_t *it = pls_insert_file (plt, after, fname, uri, pabort, cb, user_data, title, length); if (it) { after = it; @@ -350,6 +343,9 @@ load_pls (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pab p++; } p++; + while (p < end && *p <= 0x20) { + p++; + } if (p >= end) { break; } @@ -387,6 +383,9 @@ load_pls (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pab p++; } p++; + while (p < end && *p <= 0x20) { + p++; + } if (p >= end) { break; } |