nega0 / pianobarfly

pandora2[mp3|m4a]
https://github.com/nega0/pianobarfly
Other
62 stars 31 forks source link

Add songinfo event #24

Closed psifertex closed 11 years ago

psifertex commented 12 years ago

I'm using one of the common event-cmd scripts and some hotkeys to get growl feedback for song info. Originally the script used songexplain since there is no songinfo event triggered, but that generates unnecessary delays and network traffic. Instead, I added a simple songinfo event ala:

--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -239,6 +239,9 @@ BarUiActCallback(BarUiActSongInfo) {
                        selStation->isQuickMix ?
                        PianoFindStationById (app->ph.stations, selSong->stationId) :
                        NULL);
+       BarUiStartEventCmd (&app->settings, "songinfo",
+                       app->curStation, app->playlist, &app->player, app->ph.stations,
+                       PIANO_RET_OK, WAITRESS_RET_OK);
 }

 /*     print some debugging information

Sorry for submitting a diff in a comment on an issue, there's probably a much better way to do it with github directly, but I don't know how.