diff options
author | waker <wakeroid@gmail.com> | 2011-03-09 18:59:43 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-03-09 18:59:43 +0100 |
commit | c779e656a626088d2cd5aff9b12ace39ea3c3559 (patch) | |
tree | dca24b9894a4c545432ecd13870cc8721966dcf2 /plugins/shn | |
parent | 9d67fd87c68b325f52505a464df7a7748414b04f (diff) |
fixed all plugins for the API changes
Diffstat (limited to 'plugins/shn')
-rw-r--r-- | plugins/shn/shn.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 5baf8a30..7d33de5e 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -321,9 +321,9 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) { char data[4]; DB_FILE *f; - f = deadbeef->fopen (it->fname); + f = deadbeef->fopen (deadbeef->pl_find_meta (it, ":URI")); if (!f) { - trace ("shn: failed to open %s\n", it->fname); + trace ("shn: failed to open %s\n", deadbeef->pl_find_meta (it, ":URI")); return -1; } @@ -335,7 +335,7 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) { if (deadbeef->fread((void *)data,1,4,f) != 4) { deadbeef->fclose(f); - trace ("shn: failed to read magic from %s\n", it->fname); + trace ("shn: failed to read magic from %s\n", deadbeef->pl_find_meta (it, ":URI")); return -1; } deadbeef->fclose(f); @@ -345,7 +345,7 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) { return -1; } - if (!(info->shnfile = load_shn(it->fname))) { + if (!(info->shnfile = load_shn(deadbeef->pl_find_meta (it, ":URI")))) { trace ("shn: load_shn failed\n"); return -1; } @@ -893,9 +893,7 @@ shn_insert (DB_playItem_t *after, const char *fname) { return NULL; } - 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 = "Shorten"; deadbeef->pl_set_item_duration (it, tmp_file->wave_header.length); |