# HG changeset patch # User nenolod # Date 1178949127 25200 # Node ID ef86db6345e46558c4ada18543ac8741496f6b18 # Parent ff0487e9d00d15edb49ac4334985bbd2ceec7983 [svn] - some more work here diff -r ff0487e9d00d -r ef86db6345e4 ChangeLog --- a/ChangeLog Fri May 11 22:49:11 2007 -0700 +++ b/ChangeLog Fri May 11 22:52:07 2007 -0700 @@ -1,3 +1,12 @@ +2007-05-12 05:49:11 +0000 William Pitcock + revision [2216] + - first attempt at implementing AudioScrobbler 1.2 protocol + + trunk/src/scrobbler/plugin.c | 331 +++++----------------------------------- + trunk/src/scrobbler/scrobbler.c | 4 + 2 files changed, 50 insertions(+), 285 deletions(-) + + 2007-05-12 03:59:58 +0000 Yoshiki Yazawa revision [2214] - make scrobbler work again. diff -r ff0487e9d00d -r ef86db6345e4 src/scrobbler/plugin.c --- a/src/scrobbler/plugin.c Fri May 11 22:49:11 2007 -0700 +++ b/src/scrobbler/plugin.c Fri May 11 22:52:07 2007 -0700 @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -72,8 +72,10 @@ return str_has_prefix_nocase(a, "http://") || str_has_prefix_nocase(a, "https://"); } -static void hook_playback_begin(PlaylistEntry *entry) +static void hook_playback_begin(gpointer hook_data, gpointer user_data) { + PlaylistEntry *entry = (PlaylistEntry *) hook_data; + g_return_if_fail(entry != NULL); if (entry->length < 30) @@ -167,6 +169,8 @@ return; } + hook_associate("playback begin", hook_playback_begin, NULL); + pdebug("plugin started", DEBUG); } @@ -206,6 +210,8 @@ sc_cleaner(); gerpok_sc_cleaner(); + + hook_dissociate("playback begin", hook_playback_begin); } static void *xs_thread(void *data __attribute__((unused)))