From 5da807f8291c7993f23d4f90456fc804eeeca784 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 7 Mar 2010 19:18:06 +0100 Subject: [PATCH] Add ID3v2 tags to the metadata table ffmpeg doesn't convert ID3v2 tag names to generic metadata names, so add the ID3v2 tag names to the table to pick them up. This fixes scanning of MP3 files in various cases. More in this post and its attachment: Thanks to Raivo Hool for bringing up the issue and fix. --- src/filescanner_ffmpeg.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/filescanner_ffmpeg.c b/src/filescanner_ffmpeg.c index 7667d3bd..d2849aa2 100644 --- a/src/filescanner_ffmpeg.c +++ b/src/filescanner_ffmpeg.c @@ -59,12 +59,17 @@ struct metadata_map { static struct metadata_map md_map[] = { { "title", 0, mfi_offsetof(title) }, + { "TIT2", 0, mfi_offsetof(title) }, /* ID3v2 */ { "artist", 0, mfi_offsetof(artist) }, { "author", 0, mfi_offsetof(artist) }, + { "TPE1", 0, mfi_offsetof(artist) }, /* ID3v2 */ { "albumartist", 0, mfi_offsetof(album_artist) }, { "album", 0, mfi_offsetof(album) }, + { "TALB", 0, mfi_offsetof(album) }, /* ID3v2 */ { "genre", 0, mfi_offsetof(genre) }, + { "TCON", 0, mfi_offsetof(genre) }, /* ID3v2 */ { "composer", 0, mfi_offsetof(composer) }, + { "TCOM", 0, mfi_offsetof(composer) }, /* ID3v2 */ { "grouping", 0, mfi_offsetof(grouping) }, { "orchestra", 0, mfi_offsetof(orchestra) }, { "conductor", 0, mfi_offsetof(conductor) }, @@ -73,10 +78,14 @@ static struct metadata_map md_map[] = { "totaltracks", 1, mfi_offsetof(total_tracks) }, { "track", 1, mfi_offsetof(track) }, { "tracknumber", 1, mfi_offsetof(track) }, + { "TRCK", 1, mfi_offsetof(track) }, /* ID3v2 */ { "totaldiscs", 1, mfi_offsetof(total_discs) }, { "disc", 1, mfi_offsetof(disc) }, { "discnumber", 1, mfi_offsetof(disc) }, + { "TPOS", 1, mfi_offsetof(disc) }, /* ID3v2 */ { "year", 1, mfi_offsetof(year) }, + { "TYER", 1, mfi_offsetof(year) }, /* ID3v2 */ + { "TDRC", 1, mfi_offsetof(year) }, /* ID3v2 */ { "date", 1, mfi_offsetof(year) }, { "stik", 1, mfi_offsetof(media_kind) },