summaryrefslogtreecommitdiff
path: root/plugins/dca
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-03-09 11:38:38 +0100
committerGravatar waker <wakeroid@gmail.com>2011-03-09 11:38:38 +0100
commit2d0b00f6bbd326790c053961ccec07106cb172c7 (patch)
treea4ffb39b2a5d1c9a80aa2ba79f885d0d20667df8 /plugins/dca
parentfb269bc2b4cbbe6b457b46588d39ace1c021e3f1 (diff)
moved most of track properties from playItem struct to metadata
implemented track properties with multiple selection
Diffstat (limited to 'plugins/dca')
-rw-r--r--plugins/dca/dcaplug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/dca/dcaplug.c b/plugins/dca/dcaplug.c
index c14032e1..034e5fdc 100644
--- a/plugins/dca/dcaplug.c
+++ b/plugins/dca/dcaplug.c
@@ -356,9 +356,9 @@ static int
dts_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
ddb_dca_state_t *info = (ddb_dca_state_t *)_info;
- info->file = deadbeef->fopen (it->fname);
+ info->file = deadbeef->fopen (deadbeef->pl_find_meta (it, ":URI"));
if (!info->file) {
- trace ("dca: failed to open %s\n", it->fname);
+ trace ("dca: failed to open %s\n", deadbeef->pl_find_meta (it, ":URI"));
return -1;
}
@@ -606,9 +606,7 @@ dts_insert (DB_playItem_t *after, const char *fname) {
dur = (float)totalsamples / state.sample_rate;
}
- DB_playItem_t *it = deadbeef->pl_item_alloc ();
- it->decoder_id = deadbeef->plug_get_decoder_id (plugin.plugin.id);
- it->fname = strdup (fname);
+ DB_playItem_t *it = deadbeef->pl_item_alloc_init (fname, plugin.plugin.id);
it->filetype = filetype;
deadbeef->pl_set_item_duration (it, dur);