summaryrefslogtreecommitdiff
path: root/plugins/m3u
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-22 21:55:26 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-22 21:56:20 +0200
commit51993c5f565db1984c3b2b6de6fc0bf70d710f98 (patch)
tree8c12ae6edf3073e303b05f9ab407d12f6185f93f /plugins/m3u
parent42589a768d7c83e06724299c9f5b317748ad0334 (diff)
added uri support to plt_insert_file_int, improved pls parser
Diffstat (limited to 'plugins/m3u')
-rw-r--r--plugins/m3u/m3u.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/m3u/m3u.c b/plugins/m3u/m3u.c
index 9c1372a9..56602c4c 100644
--- a/plugins/m3u/m3u.c
+++ b/plugins/m3u/m3u.c
@@ -247,6 +247,7 @@ pls_insert_file (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, c
const char *slash = NULL;
if (strrchr (uri, '/')) {
+ trace ("pls: inserting from uri: %s\n", uri);
it = deadbeef->plt_insert_file2 (0, plt, after, uri, pabort, cb, user_data);
}
@@ -258,7 +259,7 @@ pls_insert_file (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, c
char fullpath[slash - fname + l + 2];
memcpy (fullpath, fname, slash - fname + 1);
strcpy (fullpath + (slash - fname + 1), uri);
- trace ("pls_insert_file: adding file %s\n", fullpath);
+ trace ("pls: inserting from calculated relative path: %s\n", fullpath);
it = deadbeef->plt_insert_file2 (0, plt, after, fullpath, pabort, cb, user_data);
}
if (it) {
@@ -437,6 +438,10 @@ load_pls (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pab
}
else {
trace ("pls: skipping unrecognized entry in pls file: %s\n", p);
+ e = p;
+ while (e < end && *e >= 0x20) {
+ e++;
+ }
}
while (e < end && *e < 0x20) {
e++;