From 2c170356f38f5630b9fefdc5b1e7e57babb5cc40 Mon Sep 17 00:00:00 2001 From: Robert Keevil Date: Tue, 7 Oct 2008 18:39:44 +0000 Subject: FS#9139 - support for ver 1.1 scrobbler log files. Upload any old files first - uploading software may need updating, see the LastFMLog wiki page git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18732 a1c6a512-1295-4272-9138-f99709370657 --- apps/scrobbler.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/scrobbler.c') diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 7af45a0c8f..3b35e0d66a 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c @@ -7,7 +7,7 @@ * \/ \/ \/ \/ \/ * $Id$ * - * Copyright (C) 2006 Robert Keevil + * Copyright (C) 2006-2008 Robert Keevil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -42,7 +42,7 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging #include "scrobbler.h" -#define SCROBBLER_VERSION "1.0" +#define SCROBBLER_VERSION "1.1" #if CONFIG_RTC #define SCROBBLER_FILE "/.scrobbler.log" @@ -151,24 +151,26 @@ static void add_to_cache(unsigned long play_length) { ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos), SCROBBLER_CACHE_LEN, - "%s\t%s\t%s\t%d\t%d\t%c\t%ld\n", + "%s\t%s\t%s\t%d\t%d\t%c\t%ld\t%s\n", scrobbler_entry.artist, scrobbler_entry.album?scrobbler_entry.album:"", scrobbler_entry.title, scrobbler_entry.tracknum, (int)scrobbler_entry.length/1000, rating, - (long)timestamp); + (long)timestamp, + scrobbler_entry.mb_track_id?scrobbler_entry.mb_track_id:""); } else { ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos), SCROBBLER_CACHE_LEN, - "%s\t%s\t%s\t\t%d\t%c\t%ld\n", + "%s\t%s\t%s\t\t%d\t%c\t%ld\t%s\n", scrobbler_entry.artist, scrobbler_entry.album?scrobbler_entry.album:"", scrobbler_entry.title, (int)scrobbler_entry.length/1000, rating, - (long)timestamp); + (long)timestamp, + scrobbler_entry.mb_track_id?scrobbler_entry.mb_track_id:""); } if ( ret >= SCROBBLER_CACHE_LEN ) -- cgit v1.2.3