summaryrefslogtreecommitdiff
path: root/plugins/wildmidi
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/wildmidi
parentfb269bc2b4cbbe6b457b46588d39ace1c021e3f1 (diff)
moved most of track properties from playItem struct to metadata
implemented track properties with multiple selection
Diffstat (limited to 'plugins/wildmidi')
-rw-r--r--plugins/wildmidi/wildmidiplug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/wildmidi/wildmidiplug.c b/plugins/wildmidi/wildmidiplug.c
index 4136745d..ca26e497 100644
--- a/plugins/wildmidi/wildmidiplug.c
+++ b/plugins/wildmidi/wildmidiplug.c
@@ -52,9 +52,9 @@ int
wmidi_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
wmidi_info_t *info = (wmidi_info_t *)_info;
- info->m = WildMidi_Open (it->fname);
+ info->m = WildMidi_Open (deadbeef->pl_find_meta (it, ":URI"));
if (!info->m) {
- trace ("wmidi: failed to open %s\n", it->fname);
+ trace ("wmidi: failed to open %s\n", deadbeef->pl_find_meta (it, ":URI"));
return -1;
}
@@ -117,9 +117,7 @@ wmidi_insert (DB_playItem_t *after, const char *fname) {
}
struct _WM_Info *inf = WildMidi_GetInfo (m);
- it = deadbeef->pl_item_alloc ();
- it->decoder_id = deadbeef->plug_get_decoder_id (wmidi_plugin.plugin.id);
- it->fname = strdup (fname);
+ it = deadbeef->pl_item_alloc_init (fname, wmidi_plugin.plugin.id);
deadbeef->pl_add_meta (it, "title", NULL);
deadbeef->pl_set_item_duration (it, inf->approx_total_samples / 44100.f);
it->filetype = "MID";