summaryrefslogtreecommitdiff
path: root/plugins/flac
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-05-08 21:14:30 +0200
committerGravatar waker <wakeroid@gmail.com>2011-05-08 21:14:30 +0200
commit3ec7a3d62a7383f19d4d4ee68ea9f0c66c9fe970 (patch)
treee7f95127ad480f446c10c81ffe220e581622e8e2 /plugins/flac
parentb5ffaa4ae71ce0520d55b99e0501b92c031e860e (diff)
changed few old-style pl_* functions which were working with current playlist with the new ones, working with specific playlist passed as argument
Diffstat (limited to 'plugins/flac')
-rw-r--r--plugins/flac/flac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/flac/flac.c b/plugins/flac/flac.c
index 4e52cee2..6485f1a4 100644
--- a/plugins/flac/flac.c
+++ b/plugins/flac/flac.c
@@ -49,6 +49,7 @@ typedef struct {
DB_FILE *file;
// used only on insert
+ ddb_playlist_t *plt;
DB_playItem_t *after;
DB_playItem_t *last;
DB_playItem_t *it;
@@ -583,7 +584,7 @@ cflac_init_metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__Str
_info->fmt.channels = metadata->data.stream_info.channels;
_info->fmt.bps = metadata->data.stream_info.bits_per_sample;
info->totalsamples = metadata->data.stream_info.total_samples;
- deadbeef->pl_set_item_duration (it, metadata->data.stream_info.total_samples / (float)metadata->data.stream_info.sample_rate);
+ deadbeef->plt_set_item_duration (info->plt, it, metadata->data.stream_info.total_samples / (float)metadata->data.stream_info.sample_rate);
}
else if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
const FLAC__StreamMetadata_VorbisComment *vc = &metadata->data.vorbis_comment;
@@ -614,6 +615,7 @@ cflac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
info.fname = fname;
info.after = after;
info.last = after;
+ info.plt = plt;
info.file = deadbeef->fopen (fname);
if (!info.file) {
goto cflac_insert_fail;