Mercurial > audlegacy-plugins
changeset 1030:9dae0c13a65f trunk
[svn] - enforce audioscrobbler rules on queued tracks
author | nenolod |
---|---|
date | Sat, 12 May 2007 00:30:49 -0700 |
parents | a33470329dbe |
children | 3707a3efcc9c |
files | ChangeLog src/scrobbler/scrobbler.c |
diffstat | 2 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat May 12 00:21:55 2007 -0700 +++ b/ChangeLog Sat May 12 00:30:49 2007 -0700 @@ -1,3 +1,11 @@ +2007-05-12 07:21:55 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [2222] + - NP pings apparently do not affect musical profile, so queue tracks for submission + + trunk/src/scrobbler/scrobbler.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + + 2007-05-12 07:19:43 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [2220] - fully update to AudioScrobbler 1.2 protocol
--- a/src/scrobbler/scrobbler.c Sat May 12 00:21:55 2007 -0700 +++ b/src/scrobbler/scrobbler.c Sat May 12 00:30:49 2007 -0700 @@ -577,12 +577,19 @@ item_t *item; i = 0; -#ifdef ALLOW_MULTIPLE + q_peekall(1); - while ((item = q_peekall(0)) && i < 10) { -#else - item = q_peek(); -#endif + + while ((item = q_peekall(0)) && i < 10) + { + /* + * don't submit queued tracks which don't yet meet audioscrobbler + * requirements... + */ + if ((time(NULL) - atoi(item->utctime)) < (atoi(item->len) / 2) && + (time(NULL) - atoi(item->utctime)) < 240) + continue; + if (!item) return i;