summaryrefslogtreecommitdiff
path: root/plugins
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
parent42589a768d7c83e06724299c9f5b317748ad0334 (diff)
added uri support to plt_insert_file_int, improved pls parser
Diffstat (limited to 'plugins')
-rw-r--r--plugins/artwork/escape.h34
-rw-r--r--plugins/m3u/m3u.c7
2 files changed, 25 insertions, 16 deletions
diff --git a/plugins/artwork/escape.h b/plugins/artwork/escape.h
index a8086a89..bd76f4d4 100644
--- a/plugins/artwork/escape.h
+++ b/plugins/artwork/escape.h
@@ -1,20 +1,24 @@
/*
- DeaDBeeF - ultimate music player for GNU/Linux systems with X11
- Copyright (C) 2009-2013 Alexey Yakovenko <waker@users.sourceforge.net>
+ DeaDBeeF -- the music player
+ Copyright (C) 2009-2014 Alexey Yakovenko and other contributors
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef __ESCAPE_H
#define __ESCAPE_H
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++;