annotate src/scrobbler/plugin.c @ 1026:ff0487e9d00d trunk

[svn] - first attempt at implementing AudioScrobbler 1.2 protocol
author nenolod
date Fri, 11 May 2007 22:49:11 -0700
parents b70103d4b5ba
children ef86db6345e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
1 #include "settings.h"
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 #include "config.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
3
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
4 #include <glib.h>
527
d124034ebea3 [svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents: 402
diff changeset
5 #include <audacious/i18n.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
6
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
7 #include <gdk/gdkkeysyms.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
8 #include <gtk/gtk.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
9
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
10 #include <audacious/plugin.h>
402
1d50eb0b5a0a [svn] - chase prefswin -> ui_preferences in audacious core
nenolod
parents: 364
diff changeset
11 #include <audacious/ui_preferences.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
12 #include <audacious/playlist.h>
4
0ad4849f6219 [svn] - the first pass missed some libaudacious references, this fixes them
nenolod
parents: 0
diff changeset
13 #include <audacious/configdb.h>
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
14 #include <audacious/beepctrl.h>
719
be03e09c7c20 [svn] - always bail on http streams
nenolod
parents: 601
diff changeset
15 #include <audacious/strings.h>
1015
69cf6184edef [svn] - make this work without controlsocket
nenolod
parents: 990
diff changeset
16 #include <audacious/main.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
17
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
18 #include <unistd.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
19 #include <stdio.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
20 #include <stdlib.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
21 #include <string.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
22 #include <ctype.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
23 #include <wchar.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
24 #include <sys/time.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
25
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
26 #include "scrobbler.h"
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
27 #include "gerpok.h"
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
28 #include "gtkstuff.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
29 #include "config.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
30 #include "fmt.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
31 #include "configure.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
32
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
33 #define XS_CS xmms_scrobbler.xmms_session
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
34 #define XS_SLEEP 1
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
35 #define HS_SLEEP 10
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
37 typedef struct submit_t
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
38 {
553
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
39 int dosubmit, pos_c, len, gerpok;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
40 } submit_t;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
41
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
42 static void init(void);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
43 static void cleanup(void);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
44 static void *xs_thread(void *);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
45 static void *hs_thread(void *);
990
238055a6cb8f [svn] - remove support for hatena music as hatena ceased their musical profile service.
yaz
parents: 880
diff changeset
46 static int sc_going, ge_going;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
47 static GtkWidget *cfgdlg;
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
48 static gboolean submit;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
49
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
50 static GMutex *m_scrobbler;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
51 static GThread *pt_scrobbler;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
52 static GThread *pt_handshake;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
53
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
54 static GMutex *hs_mutex, *xs_mutex;
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
55 static GCond *hs_cond, *xs_cond;
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
56
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
57 static GeneralPlugin xmms_scrobbler =
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
58 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
59 NULL,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
60 NULL,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
61 -1,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
62 NULL,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
63 init,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
64 about_show,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
65 NULL,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
66 cleanup
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
67 };
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
68
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
69 static gboolean ishttp(const char *a)
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
70 {
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
71 g_return_val_if_fail(a != NULL, FALSE);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
72 return str_has_prefix_nocase(a, "http://") || str_has_prefix_nocase(a, "https://");
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
73 }
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
74
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
75 static void hook_playback_begin(PlaylistEntry *entry)
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
76 {
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
77 g_return_if_fail(entry != NULL);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
78
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
79 if (entry->length < 30)
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
80 {
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
81 pdebug(" *** not submitting due to entry->length < 30", DEBUG);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
82 return;
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
83 }
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
84
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
85 if (ishttp(entry->filename))
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
86 {
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
87 pdebug(" *** not submitting due to HTTP source", DEBUG);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
88 return;
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
89 }
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
90
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
91 /* wake up the scrobbler thread to submit or queue */
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
92 submit = TRUE;
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
93 g_cond_signal(xs_cond);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
94 }
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
95
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
96 static void init(void)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
97 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
98 char *username = NULL, *password = NULL;
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
99 char *ge_username = NULL, *ge_password = NULL;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
100 ConfigDb *cfgfile;
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
101 sc_going = 1;
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
102 ge_going = 1;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
103 GError **moo = NULL;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
104 cfgdlg = create_cfgdlg();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
105
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
106 prefswin_page_new(cfgdlg, "Scrobbler", DATA_DIR "/images/audioscrobbler.png");
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
107
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
108 if ((cfgfile = bmp_cfg_db_open()) != NULL) {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
109 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "username",
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
110 &username);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
111 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "password",
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
112 &password);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
113 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "ge_username",
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
114 &ge_username);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
115 bmp_cfg_db_get_string(cfgfile, "audioscrobbler", "ge_password",
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
116 &ge_password);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
117 bmp_cfg_db_close(cfgfile);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
118 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
119
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
120 if ((!username || !password) || (!*username || !*password))
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
121 {
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
122 pdebug("username/password not found - not starting last.fm support",
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
123 DEBUG);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
124 sc_going = 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
125 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
126 else
364
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
127 {
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
128 sc_init(username, password);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
129
364
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
130 g_free(username);
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
131 g_free(password);
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
132 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
133
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
134 if ((!ge_username || !ge_password) || (!*ge_username || !*ge_password))
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
135 {
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
136 pdebug("username/password not found - not starting Gerpok support",
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
137 DEBUG);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
138 ge_going = 0;
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
139 }
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
140 else
364
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
141 {
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
142 gerpok_sc_init(ge_username, ge_password);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
143
364
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
144 g_free(ge_username);
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
145 g_free(ge_password);
50347c06ec68 [svn] - make scrobbler behave better
nenolod
parents: 363
diff changeset
146 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
147
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
148 m_scrobbler = g_mutex_new();
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
149 hs_mutex = g_mutex_new();
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
150 xs_mutex = g_mutex_new();
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
151 hs_cond = g_cond_new();
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
152 xs_cond = g_cond_new();
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
153
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
154 if ((pt_scrobbler = g_thread_create(xs_thread, NULL, TRUE, moo)) == NULL)
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
155 {
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
156 pdebug(fmt_vastr("Error creating scrobbler thread: %s", moo), DEBUG);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
157 sc_going = 0;
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
158 ge_going = 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
159 return;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
160 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
161
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
162 if ((pt_handshake = g_thread_create(hs_thread, NULL, TRUE, moo)) == NULL)
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
163 {
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
164 pdebug(fmt_vastr("Error creating handshake thread: %s", moo), DEBUG);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
165 sc_going = 0;
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
166 ge_going = 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
167 return;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
168 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
169
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
170 pdebug("plugin started", DEBUG);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
171 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
172
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
173 static void cleanup(void)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
174 {
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
175 g_free (xmms_scrobbler.description);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
176 xmms_scrobbler.description = NULL;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
177
108
0eb1e99b7748 [svn] - move prefswin_page_destroy(cfgdlg) to before the plugin logs out of last.fm;
nenolod
parents: 12
diff changeset
178 prefswin_page_destroy(cfgdlg);
0eb1e99b7748 [svn] - move prefswin_page_destroy(cfgdlg) to before the plugin logs out of last.fm;
nenolod
parents: 12
diff changeset
179
990
238055a6cb8f [svn] - remove support for hatena music as hatena ceased their musical profile service.
yaz
parents: 880
diff changeset
180 if (!sc_going && !ge_going)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
181 return;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
182 pdebug("about to lock mutex", DEBUG);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
183 g_mutex_lock(m_scrobbler);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
184 pdebug("locked mutex", DEBUG);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
185 sc_going = 0;
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
186 ge_going = 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
187 g_mutex_unlock(m_scrobbler);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
188 pdebug("joining threads", DEBUG);
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
189
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
190 /* wake up waiting threads */
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
191 pdebug("send signal to xs and hs", DEBUG);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
192 g_cond_signal(xs_cond);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
193 g_cond_signal(hs_cond);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
194
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
195 pdebug("wait xs", DEBUG);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
196 g_thread_join(pt_scrobbler);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
197
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
198 pdebug("wait hs", DEBUG);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
199 g_thread_join(pt_handshake);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
200
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
201 g_cond_free(hs_cond);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
202 g_cond_free(xs_cond);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
203 g_mutex_free(hs_mutex);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
204 g_mutex_free(xs_mutex);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
205 g_mutex_free(m_scrobbler);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
206
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
207 sc_cleaner();
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
208 gerpok_sc_cleaner();
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
209 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
210
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
211 static void *xs_thread(void *data __attribute__((unused)))
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
212 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
213 int run = 1;
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
214
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
215 while (run) {
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
216 TitleInput *tuple;
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
217 GTimeVal sleeptime;
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
218
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
219 /* Error catching */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
220 if(sc_catch_error())
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
221 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
222 errorbox_show(sc_fetch_error());
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
223 sc_clear_error();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
224 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
225
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
226 if(gerpok_sc_catch_error())
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
227 {
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
228 errorbox_show(gerpok_sc_fetch_error());
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
229 gerpok_sc_clear_error();
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
230 }
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
231
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
232 if (submit)
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
233 {
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
234 Playlist *playlist;
553
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
235
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
236 pdebug("Submitting song.", DEBUG);
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
237
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
238 playlist = playlist_get_active();
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
239 tuple = playlist_get_tuple(playlist, playlist_get_position(playlist));
553
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
240
601
45c9130027d9 [svn] - handle unavailable tuples better
nenolod
parents: 554
diff changeset
241 if (tuple == NULL)
45c9130027d9 [svn] - handle unavailable tuples better
nenolod
parents: 554
diff changeset
242 continue;
45c9130027d9 [svn] - handle unavailable tuples better
nenolod
parents: 554
diff changeset
243
553
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
244 if (ishttp(tuple->file_name))
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
245 continue;
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
246
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
247 if(tuple->performer != NULL && tuple->track_name != NULL)
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
248 {
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
249 pdebug(fmt_vastr(
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
250 "submitting artist: %s, title: %s",
269841b8fb31 [svn] - submit gerpok tracks on immediate playback begin
nenolod
parents: 527
diff changeset
251 tuple->performer, tuple->track_name), DEBUG);
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
252 sc_addentry(m_scrobbler, tuple, tuple->length / 1000);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
253 gerpok_sc_addentry(m_scrobbler, tuple, tuple->length / 1000);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
254 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
255 else
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
256 pdebug("tuple does not contain an artist or a title, not submitting.", DEBUG);
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
257
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
258 submit = FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
259 }
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
260
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
261 g_get_current_time(&sleeptime);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
262 sleeptime.tv_sec += XS_SLEEP;
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
263
1026
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
264 g_mutex_lock(xs_mutex);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
265 g_cond_timed_wait(xs_cond, xs_mutex, &sleeptime);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
266 g_mutex_unlock(xs_mutex);
ff0487e9d00d [svn] - first attempt at implementing AudioScrobbler 1.2 protocol
nenolod
parents: 1025
diff changeset
267
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
268 g_mutex_lock(m_scrobbler);
990
238055a6cb8f [svn] - remove support for hatena music as hatena ceased their musical profile service.
yaz
parents: 880
diff changeset
269 run = (sc_going != 0 || ge_going != 0);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
270 g_mutex_unlock(m_scrobbler);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
271 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
272 pdebug("scrobbler thread: exiting", DEBUG);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
273 g_thread_exit(NULL);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
274
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
275 return NULL;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
276 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
277
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
278 static void *hs_thread(void *data __attribute__((unused)))
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
279 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
280 int run = 1;
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
281 GTimeVal sleeptime;
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
282
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
283 while(run)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
284 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
285 if(sc_idle(m_scrobbler))
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
286 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
287 pdebug("Giving up due to fatal error", DEBUG);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
288 g_mutex_lock(m_scrobbler);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
289 sc_going = 0;
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
290 g_mutex_unlock(m_scrobbler);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
291 }
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
292
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
293 if(gerpok_sc_idle(m_scrobbler))
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
294 {
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
295 pdebug("Giving up due to fatal error", DEBUG);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
296 g_mutex_lock(m_scrobbler);
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
297 ge_going = 0;
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
298 g_mutex_unlock(m_scrobbler);
344
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
299 }
03c1ae10bc8d [svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents: 108
diff changeset
300
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
301 g_mutex_lock(m_scrobbler);
990
238055a6cb8f [svn] - remove support for hatena music as hatena ceased their musical profile service.
yaz
parents: 880
diff changeset
302 run = (sc_going != 0 || ge_going != 0);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
303 g_mutex_unlock(m_scrobbler);
353
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
304
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
305 if(run) {
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
306 g_get_current_time(&sleeptime);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
307 sleeptime.tv_sec += HS_SLEEP;
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
308
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
309 g_mutex_lock(hs_mutex);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
310 g_cond_timed_wait(hs_cond, hs_mutex, &sleeptime);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
311 g_mutex_unlock(hs_mutex);
1bd205b6e83d [svn] - replace g_usleep() with g_cond_timed_wait()
yaz
parents: 350
diff changeset
312 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
313 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
314 pdebug("handshake thread: exiting", DEBUG);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
315 g_thread_exit(NULL);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
316
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
317 return NULL;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
318 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
319
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
320 GeneralPlugin *get_gplugin_info(void)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
321 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
322 xmms_scrobbler.description = g_strdup_printf(_("Scrobbler Plugin"));
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
323 return &xmms_scrobbler;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
324 }