[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[abcde] Bug#114848: add year to ID3 tags114848@bugs.debian.org
Package: abcde
Version: 2.0-1
ID3 tags support the year files, abcde does not. With this patch it does.
*** /usr/bin/abcde Thu Aug 16 00:35:25 2001
--- /home/richard/bin/abcde Mon Oct 8 08:38:04 2001
***************
*** 209,215 ****
# id3 tags a filename
# variables used:
# TRACKS, TRACKNAME, TRACKARTIST, TAGGER, TAGGEROPTS, COMMENT, DALBUM, DARTIST
! # (and temporarily) ID3TAGV
do_tag ()
{
COMMENTOUTPUT="$(eval echo ${COMMENT})"
--- 209,215 ----
# id3 tags a filename
# variables used:
# TRACKS, TRACKNAME, TRACKARTIST, TAGGER, TAGGEROPTS, COMMENT, DALBUM, DARTIST
! # CDYEAR, (and temporarily) ID3TAGV
do_tag ()
{
COMMENTOUTPUT="$(eval echo ${COMMENT})"
***************
*** 220,230 ****
# v3.7.x keeping -c from being properly implemented)
if [ "$ID3TAGV" = "2" ]; then
run_command tagtrack-$1 $TAGGER $TAGGEROPTS -A "$DALBUM" -a "$TRACKARTIST" \
! -t "$TRACKNAME" -T "$1" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE"
else
run_command tagtrack-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \
! -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" -T "$1" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE"
fi
else
# vorbiscomment can't do in-place modification, mv the file first
if [ -f "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" -a \! -f "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE" ]; then
--- 220,230 ----
# v3.7.x keeping -c from being properly implemented)
if [ "$ID3TAGV" = "2" ]; then
run_command tagtrack-$1 $TAGGER $TAGGEROPTS -A "$DALBUM" -a "$TRACKARTIST" \
! -t "$TRACKNAME" -T "$1" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" -y "$CDYEAR"
else
run_command tagtrack-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \
! -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" -T "$1" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" -y "$CDYEAR"
fi
else
# vorbiscomment can't do in-place modification, mv the file first
if [ -f "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" -a \! -f "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE" ]; then
***************
*** 614,619 ****
--- 614,622 ----
# do_cddbedit
do_cddbedit ()
{
+ # 10/08/2001 Richard van den Berg: restore CDYEAR across resumes
+ CDYEAR=`grep cddb-year < "$ABCDETEMPDIR/status" | sed -e 's/.*=//g'`
+
if checkstatus cddb-edit; then
CDDBDATA="$ABCDETEMPDIR/cddbread.$(checkstatus cddb-choice)"
return 0
***************
*** 793,798 ****
--- 808,835 ----
esac
fi
+ # 10/07/2001 Richard van den Berg: ask for year to put in ID3 tag
+ if [ "$DOTAG" = "y" ]; then
+
+ echo -n "What year is the CD from? [0=unknown] (0): " >&2
+ if [ "$INTERACTIVE" = "y" ]; then
+ read CDYEAR
+ else
+ echo 0 >&2
+ CDYEAR=0
+ fi
+ CDYEAR=`echo $CDYEAR | \
+ tr -d "[:space:][:alpha:][:cntrl:][:punct:]"`
+ if [ "$CDYEAR" -eq 0 -o "$CDYEAR" = "" ]; then
+ CDYEAR=''
+ elif [ "$CDYEAR" -lt 50 ]; then
+ CDYEAR=`expr $CDYEAR + 2000`
+ elif [ "$CDYEAR" -lt 100 ]; then
+ CDYEAR=`expr $CDYEAR + 1900`
+ fi
+ echo "cddb-year=$CDYEAR" >> "$ABCDETEMPDIR/status"
+ fi
+
# This is temporarily commented out until I have a chance to mess with it a
# little more. --rcw 8/31/1999
#
***************
*** 861,866 ****
--- 898,904 ----
READNICE=10
VARIOUSARTISTS=n
VARIOUSARTISTSTYLE=forward
+ CDYEAR=''
# program paths - defaults to checking your $PATH
LAME=lame
To unsubscribe: echo unsubscribe | mail abcde-request@whimsica.lly.org