diff options
Diffstat (limited to 'plugins/m3u/m3u.c')
-rw-r--r-- | plugins/m3u/m3u.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/m3u/m3u.c b/plugins/m3u/m3u.c index 18ed73c2..fae1f6c6 100644 --- a/plugins/m3u/m3u.c +++ b/plugins/m3u/m3u.c @@ -39,7 +39,7 @@ skipspaces (const uint8_t *p, const uint8_t *end) { } static DB_playItem_t * -load_m3u (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { +load_m3u (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { printf ("load_m3u: cb=%p\n", cb); const char *slash = strrchr (fname, '/'); trace ("enter pl_insert_m3u\n"); @@ -121,13 +121,13 @@ load_m3u (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla } static DB_playItem_t * -pls_insert_file (DB_playItem_t *after, const char *fname, const char *uri, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data, const char *title, const char *length) { +pls_insert_file (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, const char *uri, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data, const char *title, const char *length) { trace ("pls_insert_file uri: %s\n", uri); DB_playItem_t *it = NULL; const char *slash = NULL; if (strrchr (uri, '/')) { - it = deadbeef->pl_insert_file (after, uri, pabort, cb, user_data); + it = deadbeef->plt_insert_file (plt, after, uri, pabort, cb, user_data); } else if (slash = strrchr (fname, '/')) { int l = strlen (uri); @@ -135,10 +135,10 @@ pls_insert_file (DB_playItem_t *after, const char *fname, const char *uri, int * memcpy (fullpath, fname, slash - fname + 1); strcpy (fullpath + (slash - fname + 1), uri); trace ("pls_insert_file: adding file %s\n", fullpath); - it = deadbeef->pl_insert_file (after, fullpath, pabort, cb, user_data); + it = deadbeef->plt_insert_file (plt, after, fullpath, pabort, cb, user_data); } if (length[0]) { - deadbeef->pl_set_item_duration (it, atoi (length)); + deadbeef->plt_set_item_duration (plt, it, atoi (length)); } if (title[0]) { deadbeef->pl_replace_meta (it, "title", title); @@ -147,7 +147,7 @@ pls_insert_file (DB_playItem_t *after, const char *fname, const char *uri, int * } static DB_playItem_t * -load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { +load_pls (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { const char *slash = strrchr (fname, '/'); DB_FILE *fp = deadbeef->fopen (fname); if (!fp) { @@ -204,7 +204,7 @@ load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla int idx = atoi (p + 4); if (uri[0] && idx != lastidx && lastidx != -1) { trace ("uri%d\n", idx); - DB_playItem_t *it = pls_insert_file (after, fname, uri, pabort, cb, user_data, title, length); + DB_playItem_t *it = pls_insert_file (plt, after, fname, uri, pabort, cb, user_data, title, length); if (it) { after = it; } @@ -244,7 +244,7 @@ load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla int idx = atoi (p + 5); if (uri[0] && idx != lastidx && lastidx != -1) { trace ("title%d\n", idx); - DB_playItem_t *it = pls_insert_file (after, fname, uri, pabort, cb, user_data, title, length); + DB_playItem_t *it = pls_insert_file (plt, after, fname, uri, pabort, cb, user_data, title, length); if (it) { after = it; } @@ -283,7 +283,7 @@ load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla int idx = atoi (p + 6); if (uri[0] && idx != lastidx && lastidx != -1) { trace ("length%d\n", idx); - DB_playItem_t *it = pls_insert_file (after, fname, uri, pabort, cb, user_data, title, length); + DB_playItem_t *it = pls_insert_file (plt, after, fname, uri, pabort, cb, user_data, title, length); if (it) { after = it; } @@ -327,7 +327,7 @@ load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla p = e; } if (uri[0]) { - DB_playItem_t *it = pls_insert_file (after, fname, uri, pabort, cb, user_data, title, length); + DB_playItem_t *it = pls_insert_file (plt, after, fname, uri, pabort, cb, user_data, title, length); if (it) { after = it; } @@ -340,7 +340,7 @@ load_pls (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_pla } static DB_playItem_t * -m3uplug_load (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { +m3uplug_load (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB_playItem_t *it, void *data), void *user_data) { const char *ext = strrchr (fname, '.'); if (!ext) { return NULL; @@ -348,10 +348,10 @@ m3uplug_load (DB_playItem_t *after, const char *fname, int *pabort, int (*cb)(DB ext++; if (!strcasecmp (ext, "m3u") || !strcasecmp (ext, "m3u8")) { - return load_m3u (after, fname, pabort, cb, user_data); + return load_m3u (plt, after, fname, pabort, cb, user_data); } else if (!strcasecmp (ext, "pls")) { - return load_pls (after, fname, pabort, cb, user_data); + return load_pls (plt, after, fname, pabort, cb, user_data); } return NULL; @@ -428,7 +428,7 @@ m3uplug_save_pls (const char *fname, DB_playItem_t *first, DB_playItem_t *last) } int -m3uplug_save (const char *fname, DB_playItem_t *first, DB_playItem_t *last) { +m3uplug_save (ddb_playlist_t *plt, const char *fname, DB_playItem_t *first, DB_playItem_t *last) { const char *e = strrchr (fname, '.'); if (!e) { return -1; |