From 3ec7a3d62a7383f19d4d4ee68ea9f0c66c9fe970 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 8 May 2011 21:14:30 +0200 Subject: changed few old-style pl_* functions which were working with current playlist with the new ones, working with specific playlist passed as argument --- plugins/flac/flac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/flac') 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; -- cgit v1.2.3