From 1a17d8985a2eb4e6d6cc0ee3a5f1dadc5a5ca754 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 5 Mar 2013 13:34:16 +0100 Subject: [PATCH] getInfos::MP3 (ID3v1 only) --- atom | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/atom b/atom index 44d73d6..36a19c6 100755 --- a/atom +++ b/atom @@ -629,7 +629,30 @@ removeObsoleteFiles() { } getInfos::MP3() { - : +# mp3info only supports ID3v1. Information may be incomplete. + infos=$( + mp3info -p ' +ALBUM=%l +ARTIST=%a +GENRE=%g +TITLE=%t +TRACKNUM=%n +YEAR=%y' "$sourcepath/$filename" \ + | iconv -f $sourceid3charset -t utf-8//TRANSLIT + ) + album=$(gettag album) + artist=$(gettag artist) + genre=$(gettag genre) + title=$(gettag title) + tracknum=$(gettag tracknum) + year=$(gettag year) + [ -n "$album" \ + -o -n "$artist" \ + -o -n "$genre" \ + -o -n "$title" \ + -o -n "$tracknum" \ + -o -n "$year" ] \ + || return 1 } getInfos::Ogg() {