Commit 1be1620c authored by Cédric Marie's avatar Cédric Marie
Browse files

tag-sieve: Keep full date by default



In "clean" command, replace -d option (keep date) with -y option (year
only). By default, the full date is now kept unchanged, and -y option
must be used to keep only the year.
Signed-off-by: default avatarCédric Marie <cedric.marie@openmailbox.org>
parent 2bf79a57
......@@ -155,13 +155,13 @@ fi
if [ "$command" = "clean" ]; then
keep_date=0
year_only=0
multi_artist=0
shift 1
while getopts da OPT
while getopts ya OPT
do
case $OPT in
d) keep_date=1;;
y) year_only=1;;
a) multi_artist=1;;
*) print_usage; exit 1;;
esac
......@@ -183,7 +183,7 @@ if [ "$command" = "clean" ]; then
tag_album=${tag_album#ALBUM=}
tag_date=`grep "^DATE=" $tags_filename | tail -n 1`
tag_date=${tag_date#DATE=}
if [ "$keep_date" = "0" ]; then
if [ "$year_only" = "1" ]; then
tag_date=${tag_date%%-*}
fi
tag_tracktotal=`grep "^TRACKTOTAL=" $tags_filename | tail -n 1`
......@@ -353,12 +353,12 @@ fi
if [ "$command" = "clean-single" ]; then
keep_date=0
year_only=0
shift 1
while getopts d OPT
while getopts y OPT
do
case $OPT in
d) keep_date=1;;
y) year_only=1;;
*) print_usage; exit 1;;
esac
done
......@@ -378,7 +378,7 @@ if [ "$command" = "clean-single" ]; then
tag_title=${tag_title#TITLE=}
tag_date=`grep "^DATE=" $tags_filename | tail -n 1`
tag_date=${tag_date#DATE=}
if [ "$keep_date" = "0" ]; then
if [ "$year_only" = "1" ]; then
tag_date=${tag_date%%-*}
fi
tag_comment=`grep "^COMMENT=" $tags_filename | tail -n 1`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment