Public bug reported:
libtmp-sendtr crash when trying to manually send track to Creative Zen
micro (MTP) device through this script:
#!/bin/bash
#
# Send one or more mp3 files to an MTP (PlayForSure) compatible device.
#
ME=`basename ${0}`
EXT='mp3'
SENDTRACK="mtp-sendtr"
TAGINFO="id3v2 --list"
do_usage() { # explanatory text
echo "usage: ${ME} [-h] [file]"
echo " Send music to an MTP compatible device."
echo " Works for any mp3 file, or all mp3 files in a directory."
echo ""
echo " -h Print this message"
exit 0
}
do_error() {
echo "$*"
exit 1
}
get_tags() {
info=`$TAGINFO "$1" 2>&1`
artist=`echo "$info" | grep TPE1 | sed s/\.\*\:\ //g`
album=`echo "$info" | grep TALB | sed s/\.\*\:\ //g`
song=`echo "$info" | grep TIT2 | sed s/\.\*\:\ //g`
track=`echo "$info" | grep TRCK | sed s/\.\*\:\ //g | cut -f1 -d "/"`
year=`echo "$info" | grep TYER | sed s/\.\*\:\ //g`
genre=`echo "$info" | grep TCON | sed s/\.\*\:\ //g | cut -f1 -d " "`
length=`echo "$info" | grep TLEN | sed s/\.\*\:\ //g`
}
send_track() {
${SENDTRACK} -q -t "$song" -a "$artist" -l "$album" -c mp3 -g "$genre" -n
"$track" -d "$length" "$1"
}
GETOPT=`getopt -o l:m:b:e:cfhrv -n ${ME} -- "$@"`
if [ $? -ne 0 ]
then
do_usage
fi
eval set -- "$GETOPT"
while true
do
case "$1" in
-h) do_usage ;;
--help) do_usage ;;
--) shift ; break ;;
*) do_usage ;;
esac
done
if [ $# -eq 0 ]
then # Convert all files in current directory
for IFILE in *.${EXT}
do
if [ "${IFILE}" == "*.${EXT}" ]
then
do_error "No files with extension ${EXT} in this directory."
fi
get_tags "${IFILE}"
send_track "${IFILE}"
done
else # Convert listed files
for IFILE in "$*"
do
test -f "${IFILE}" || do_error "${IFILE} not found."
get_tags "${IFILE}"
send_track "${IFILE}"
done
fi
exit 0
I installed libmtp myself from sources and made a .deb.
Don't hesitate to ask for more info !
** Affects: libmtp (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
libtmp-sendtr crash when trying to manually send track
https://launchpad.net/bugs/78488
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs