diff options
Diffstat (limited to 'plugins/ffap/ffap.c')
-rw-r--r-- | plugins/ffap/ffap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c index 993863ed..7269b32e 100644 --- a/plugins/ffap/ffap.c +++ b/plugins/ffap/ffap.c @@ -1668,6 +1668,19 @@ ffap_insert (DB_playItem_t *after, const char *fname) { deadbeef->fseek (fp, 0, SEEK_END); } int apeerr = deadbeef->junk_read_ape (it, fp); + + // embedded cue + const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet"); + if (cuesheet) { + DB_playItem_t *last = deadbeef->pl_insert_cue_from_buffer (after, fname, cuesheet, strlen (cuesheet), &plugin, plugin.filetypes[0], ape_ctx.totalsamples, ape_ctx.samplerate); + if (last) { + deadbeef->pl_item_free (it); + deadbeef->fclose (fp); + ape_free_ctx (&ape_ctx); + return last; + } + } + deadbeef->pl_add_meta (it, "title", NULL); after = deadbeef->pl_insert_item (after, it); |