diff options
author | 2010-04-19 20:27:52 +0200 | |
---|---|---|
committer | 2010-04-19 20:27:52 +0200 | |
commit | d10d940aa6a9c361c61d81ed378b46b8afb17198 (patch) | |
tree | af7ed351df6a2c906b7086fb371b6a22f3038fd3 /plugins/mpgmad | |
parent | 671f7f881faa64cede428431fb1d61e8fa007a26 (diff) |
cleaned up some of bad/unused messages and events;
implemented new notification-daemon osd;
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r-- | plugins/mpgmad/mpgmad.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index 2dc1a88d..218f32c5 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -875,8 +875,7 @@ cmp3_stream_frame (mpgmad_info_t *info) { if (!eof) { if (info->buffer.file->vfs->streaming && info->buffer.currentsample - info->buffer.last_comment_update > 5 * info->info.samplerate) { - int idx = deadbeef->pl_get_idx_of (info->buffer.it); - if (idx >= 0) { + if (info->buffer.it) { info->buffer.last_comment_update = info->buffer.currentsample; const char *vfs_tit = deadbeef->fget_content_name (info->buffer.file); if (vfs_tit) { @@ -885,11 +884,11 @@ cmp3_stream_frame (mpgmad_info_t *info) { char out[1024]; deadbeef->junk_recode (vfs_tit, strlen (vfs_tit), out, sizeof (out), cs); deadbeef->pl_replace_meta (info->buffer.it, "title", out); - deadbeef->sendmessage (M_TRACKCHANGED, 0, idx, 0); + deadbeef->plug_trigger_event_trackinfochanged (info->buffer.it); } else { deadbeef->pl_replace_meta (info->buffer.it, "title", vfs_tit); - deadbeef->sendmessage (M_TRACKCHANGED, 0, idx, 0); + deadbeef->plug_trigger_event_trackinfochanged (info->buffer.it); } } } |