summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-03-05 12:38:03 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-03-06 10:55:52 +0100
commited2240e0990236bf50d795ac86a2dfad05e1a086 (patch)
tree040a468f74d9389716101ac9cbd9b2159a4999bb /src/main.c
parent064db905c761df7e9e4e3b5d99807d4c44c4a86b (diff)
downloadpianobar-ed2240e0990236bf50d795ac86a2dfad05e1a086.tar.gz
pianobar-ed2240e0990236bf50d795ac86a2dfad05e1a086.tar.bz2
pianobar-ed2240e0990236bf50d795ac86a2dfad05e1a086.zip
Added song length and rating to eventcmd, new songfinish event
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b7f6235..82ed674 100644
--- a/src/main.c
+++ b/src/main.c
@@ -159,6 +159,8 @@ int main (int argc, char **argv) {
while (!doQuit) {
/* song finished playing, clean up things/scrobble song */
if (player.mode == PLAYER_FINISHED_PLAYBACK) {
+ BarUiStartEventCmd (&settings, "songfinish", curStation, playlist,
+ &player, PIANO_RET_OK);
/* FIXME: pthread_join blocks everything if network connection
* is hung up e.g. */
void *threadRet;
@@ -222,7 +224,7 @@ int main (int argc, char **argv) {
}
}
BarUiStartEventCmd (&settings, "stationfetchplaylist",
- curStation, playlist, pRet);
+ curStation, playlist, &player, pRet);
}
/* song ready to play */
if (playlist != NULL) {
@@ -244,7 +246,7 @@ int main (int argc, char **argv) {
/* throw event */
BarUiStartEventCmd (&settings, "songstart", curStation,
- playlist, PIANO_RET_OK);
+ playlist, &player, PIANO_RET_OK);
/* start player */
pthread_create (&playerThread, NULL, BarPlayerThread,