summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-04-10 16:17:56 +0200
committerGravatar waker <wakeroid@gmail.com>2011-04-10 16:17:56 +0200
commit3f1b1e36c54ceb78ebfc13c07585bc90397757e2 (patch)
tree0333a30552c5c5c15b8b60a9e0606a5724e21a0f /plugins
parent8cb55790c147882edbd9b2f678f6edb4fb8336b2 (diff)
use songstarted event in notify plugin instead of songchanged
Diffstat (limited to 'plugins')
-rw-r--r--plugins/notify/notify.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/notify/notify.c b/plugins/notify/notify.c
index c572b131..7896baf9 100644
--- a/plugins/notify/notify.c
+++ b/plugins/notify/notify.c
@@ -243,9 +243,9 @@ static void show_notification (DB_playItem_t *track) {
}
static int
-on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) {
- if (ev->to && deadbeef->conf_get_int ("notify.enable", 0)) {
- DB_playItem_t *track = ev->to;
+on_songstarted (DB_event_track_t *ev, uintptr_t data) {
+ if (ev->track && deadbeef->conf_get_int ("notify.enable", 0)) {
+ DB_playItem_t *track = ev->track;
if (track) {
show_notification (track);
}
@@ -255,13 +255,13 @@ on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) {
int
notify_start (void) {
- deadbeef->ev_subscribe (DB_PLUGIN (&plugin), DB_EV_SONGCHANGED, DB_CALLBACK (on_songchanged), 0);
+ deadbeef->ev_subscribe (DB_PLUGIN (&plugin), DB_EV_SONGSTARTED, DB_CALLBACK (on_songstarted), 0);
return 0;
}
int
notify_stop (void) {
- deadbeef->ev_unsubscribe (DB_PLUGIN (&plugin), DB_EV_SONGCHANGED, DB_CALLBACK (on_songchanged), 0);
+ deadbeef->ev_unsubscribe (DB_PLUGIN (&plugin), DB_EV_SONGSTARTED, DB_CALLBACK (on_songstarted), 0);
return 0;
}