diff options
author | 2010-04-17 22:23:46 +0200 | |
---|---|---|
committer | 2010-04-17 22:23:46 +0200 | |
commit | f7b69992c780be685f014808118a94aef3d87fed (patch) | |
tree | 9943c9ad1475f0042c3a5ef9497177f34879fc49 /plugins/ffap/ffap.c | |
parent | f29d6657ba7d4d08967fb369bae2e1b3c033bb53 (diff) |
added flags to each track in playlist, which bumped dbpl version to 1.2;
list of file tags is no longer written as metadata string, but as flags;
fixed couple of memory leaks;
blocked metadata editing in subtracks;
blocked metadata editing if playlist file format is less than 1.2;
Diffstat (limited to 'plugins/ffap/ffap.c')
-rw-r--r-- | plugins/ffap/ffap.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c index db3a505d..60ba9b18 100644 --- a/plugins/ffap/ffap.c +++ b/plugins/ffap/ffap.c @@ -1729,25 +1729,28 @@ ffap_insert (DB_playItem_t *after, const char *fname) { deadbeef->fclose (fp); ape_free_ctx (&ape_ctx); - DB_playItem_t *cue = deadbeef->pl_insert_cue (after, it, ape_ctx.totalsamples, ape_ctx.samplerate); - if (cue) { - deadbeef->pl_item_unref (it); - return cue; - } - // embedded cue deadbeef->pl_lock (); const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet"); + DB_playItem_t *cue = NULL; if (cuesheet) { cue = deadbeef->pl_insert_cue_from_buffer (after, it, cuesheet, strlen (cuesheet), ape_ctx.totalsamples, ape_ctx.samplerate); if (cue) { deadbeef->pl_item_unref (it); + deadbeef->pl_item_unref (cue); deadbeef->pl_unlock (); return cue; } } deadbeef->pl_unlock (); + cue = deadbeef->pl_insert_cue (after, it, ape_ctx.totalsamples, ape_ctx.samplerate); + if (cue) { + deadbeef->pl_item_unref (it); + deadbeef->pl_item_unref (cue); + return cue; + } + deadbeef->pl_add_meta (it, "title", NULL); after = deadbeef->pl_insert_item (after, it); deadbeef->pl_item_unref (it); |