summaryrefslogtreecommitdiff
path: root/plugins/dumb
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-01-02 13:16:18 +0100
committerGravatar waker <wakeroid@gmail.com>2011-01-02 13:16:18 +0100
commit28483484c0a1b4911ed09018f37a505a2eaf1e3f (patch)
treed256a79527b2f0db5524a0b35d471f2e31cb2da7 /plugins/dumb
parent74d580c68fbae834dd626e40a60759c5d2d4f59a (diff)
load instruments and samples metadata in dumb plugin
Diffstat (limited to 'plugins/dumb')
-rw-r--r--plugins/dumb/cdumb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/dumb/cdumb.c b/plugins/dumb/cdumb.c
index c7072fcc..239c7650 100644
--- a/plugins/dumb/cdumb.c
+++ b/plugins/dumb/cdumb.c
@@ -752,6 +752,17 @@ cdumb_insert (DB_playItem_t *after, const char *fname) {
else {
deadbeef->pl_add_meta (it, "title", NULL);
}
+ int i;
+ for (i = 0; i < itsd->n_instruments; i++) {
+ char key[100];
+ snprintf (key, sizeof (key), "INST%03d", i);
+ deadbeef->pl_add_meta (it, key, (const char *)itsd->instrument[i].name);
+ }
+ for (i = 0; i < itsd->n_samples; i++) {
+ char key[100];
+ snprintf (key, sizeof (key), "SAMP%03d", i);
+ deadbeef->pl_add_meta (it, key, (const char *)itsd->sample[i].name);
+ }
dumb_it_do_initial_runthrough (duh);
deadbeef->pl_set_item_duration (it, duh_get_length (duh)/65536.0f);
it->filetype = ftype;