diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-06 21:59:37 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-06 21:59:37 +0100 |
commit | acff47388e6471facd73e7b41e9c94f5cda7ee11 (patch) | |
tree | d4954bc78f96b2859171ac01586583d6069b64b8 | |
parent | dd7d9db0a3858006c2f10eab5d08eb0ea9709712 (diff) |
fixed bug in .pls parser stopping after 1st track
-rw-r--r-- | playlist.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -544,6 +544,7 @@ pl_insert_pls (playItem_t *after, const char *fname, int *pabort, int (*cb)(play break; } p += 6; + // skip = while (p < end && *p != '=') { p++; } @@ -558,18 +559,21 @@ pl_insert_pls (playItem_t *after, const char *fname, int *pabort, int (*cb)(play n = e-p; n = min (n, sizeof (length)-1); memcpy (length, p, n); - length[n] = 0; - trace ("length: %s\n", length); // add track playItem_t *it = pl_insert_file (after, url, pabort, cb, user_data); if (it) { after = it; pl_set_item_duration (it, atoi (length)); + pl_delete_all_meta (it); pl_add_meta (it, "title", title); } if (pabort && *pabort) { return after; } + while (e < end && *e < 0x20) { + e++; + } + p = e; } return after; } |