This commit is contained in:
Vincent Riquer 2013-03-05 13:33:28 +01:00
parent 69b63c3d48
commit d2f138da1b

36
atom
View File

@ -640,14 +640,42 @@ getInfos::FLAC() {
: :
} }
getInfos::MPC() { getInfos::APE() {
: :
} }
getTags() { getTags() {
#getType unset type
#getInfos::<type> case "$mimetype" in
: audio/mpeg)
type=MP3
;;
application/ogg)
type=Ogg
;;
audio/x-flac)
type=FLAC
;;
*)
extendedtype=$(file -b "$sourcepath/$filename")
case "$extendedtype" in
*' ID3 '*)
type=MP3
;;
*)
grep -q 'APETAGEX' \
"$sourcepath/$filename" \
&& type=APE
;;
esac
;;
esac
if [ -n "$type" ]
then
getInfos::$type || return 1
else
return 1
fi
} }
encodeFile::MP3() { encodeFile::MP3() {