summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/metadata/asf.c3
-rw-r--r--apps/metadata/metadata_common.c5
-rw-r--r--apps/metadata/mp4.c5
-rw-r--r--apps/scrobbler.c14
4 files changed, 21 insertions, 6 deletions
diff --git a/apps/metadata/asf.c b/apps/metadata/asf.c
index fa1308b560..255a0bcba4 100644
--- a/apps/metadata/asf.c
+++ b/apps/metadata/asf.c
@@ -465,6 +465,9 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
465 id3buf = value; 465 id3buf = value;
466 id3buf_remaining = buf_len; 466 id3buf_remaining = buf_len;
467 } 467 }
468 } else if (!strcmp("MusicBrainz/Track Id", utf8buf)) {
469 id3->mb_track_id = id3buf;
470 asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining);
468 } else { 471 } else {
469 lseek(fd, length, SEEK_CUR); 472 lseek(fd, length, SEEK_CUR);
470 } 473 }
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c
index 1fff030e57..e4df874cff 100644
--- a/apps/metadata/metadata_common.c
+++ b/apps/metadata/metadata_common.c
@@ -293,6 +293,11 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
293 { 293 {
294 p = &(id3->grouping); 294 p = &(id3->grouping);
295 } 295 }
296 else if (strcasecmp(name, "musicbrainz_trackid") == 0
297 || strcasecmp(name, "http://musicbrainz.org") == 0 )
298 {
299 p = &(id3->mb_track_id);
300 }
296 else 301 else
297 { 302 {
298 len = parse_replaygain(name, value, id3, buf, buf_remaining); 303 len = parse_replaygain(name, value, id3, buf, buf_remaining);
diff --git a/apps/metadata/mp4.c b/apps/metadata/mp4.c
index 187459b7fb..493bc48da7 100644
--- a/apps/metadata/mp4.c
+++ b/apps/metadata/mp4.c
@@ -498,6 +498,11 @@ static bool read_mp4_tags(int fd, struct mp3entry* id3,
498 DEBUGF("AAC: lead_trim %d, tail_trim %d\n", 498 DEBUGF("AAC: lead_trim %d, tail_trim %d\n",
499 id3->lead_trim, id3->tail_trim); 499 id3->lead_trim, id3->tail_trim);
500 } 500 }
501 else if (strcasecmp(tag_name, "musicbrainz track id") == 0)
502 {
503 read_mp4_tag_string(fd, size, &buffer, &buffer_left,
504 &id3->mb_track_id);
505 }
501 else 506 else
502 { 507 {
503 char* any; 508 char* any;
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 @@
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2006 Robert Keevil 10 * Copyright (C) 2006-2008 Robert Keevil
11 * 11 *
12 * This program is free software; you can redistribute it and/or 12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 13 * modify it under the terms of the GNU General Public License
@@ -42,7 +42,7 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging
42 42
43#include "scrobbler.h" 43#include "scrobbler.h"
44 44
45#define SCROBBLER_VERSION "1.0" 45#define SCROBBLER_VERSION "1.1"
46 46
47#if CONFIG_RTC 47#if CONFIG_RTC
48#define SCROBBLER_FILE "/.scrobbler.log" 48#define SCROBBLER_FILE "/.scrobbler.log"
@@ -151,24 +151,26 @@ static void add_to_cache(unsigned long play_length)
151 { 151 {
152 ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos), 152 ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos),
153 SCROBBLER_CACHE_LEN, 153 SCROBBLER_CACHE_LEN,
154 "%s\t%s\t%s\t%d\t%d\t%c\t%ld\n", 154 "%s\t%s\t%s\t%d\t%d\t%c\t%ld\t%s\n",
155 scrobbler_entry.artist, 155 scrobbler_entry.artist,
156 scrobbler_entry.album?scrobbler_entry.album:"", 156 scrobbler_entry.album?scrobbler_entry.album:"",
157 scrobbler_entry.title, 157 scrobbler_entry.title,
158 scrobbler_entry.tracknum, 158 scrobbler_entry.tracknum,
159 (int)scrobbler_entry.length/1000, 159 (int)scrobbler_entry.length/1000,
160 rating, 160 rating,
161 (long)timestamp); 161 (long)timestamp,
162 scrobbler_entry.mb_track_id?scrobbler_entry.mb_track_id:"");
162 } else { 163 } else {
163 ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos), 164 ret = snprintf(scrobbler_cache+(SCROBBLER_CACHE_LEN*cache_pos),
164 SCROBBLER_CACHE_LEN, 165 SCROBBLER_CACHE_LEN,
165 "%s\t%s\t%s\t\t%d\t%c\t%ld\n", 166 "%s\t%s\t%s\t\t%d\t%c\t%ld\t%s\n",
166 scrobbler_entry.artist, 167 scrobbler_entry.artist,
167 scrobbler_entry.album?scrobbler_entry.album:"", 168 scrobbler_entry.album?scrobbler_entry.album:"",
168 scrobbler_entry.title, 169 scrobbler_entry.title,
169 (int)scrobbler_entry.length/1000, 170 (int)scrobbler_entry.length/1000,
170 rating, 171 rating,
171 (long)timestamp); 172 (long)timestamp,
173 scrobbler_entry.mb_track_id?scrobbler_entry.mb_track_id:"");
172 } 174 }
173 175
174 if ( ret >= SCROBBLER_CACHE_LEN ) 176 if ( ret >= SCROBBLER_CACHE_LEN )