[Abcde-users] [PATCH 1/6] Show release year in cddb choices list

Snild Dolkow snild at dolkow.se
Sun Aug 20 08:36:53 BST 2023


Closes Issue 161: https://abcde.einval.com/bugzilla/show_bug.cgi?id=161
---
 abcde | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/abcde b/abcde
index b53593a..cf7e23a 100755
--- a/abcde
+++ b/abcde
@@ -5183,8 +5183,10 @@ if [ "$DOCDDB" = "y" ]; then
 				for X in $(f_seq_row 1 $NUM_CDDB_MATCHES)
 				do
 					ATITLE=$(grep -a -e '^DTITLE=' "${ABCDETEMPDIR}/cddbread.$X" | cut -c8- | tr -d \\r\\n)
+					AYEAR=$(grep -a -e '^DYEAR=' "${ABCDETEMPDIR}/cddbread.$X" | cut -c7- | tr -d \\r\\n)
+					AYEAR=${AYEAR:-Unknown year}
 					SOURCE=$(cat "${ABCDETEMPDIR}/datasource.$X")
-					echo "#$X ($SOURCE): ---- ${ATITLE} ----" >> "${ABCDETEMPDIR}/cddbchoices"
+					echo "#$X ($SOURCE): ---- ${ATITLE} ($AYEAR) ----" >> "${ABCDETEMPDIR}/cddbchoices"
                     for TRACK in $(f_seq_row 1 $TRACKS)
 					do
                         echo "$TRACK:" "$(grep -a ^TTITLE$(($TRACK - 1))= "${ABCDETEMPDIR}/cddbread.$X" | cut -f2- -d= | tr -d \\r\\n)" >> "${ABCDETEMPDIR}/cddbchoices"
-- 
2.41.0




More information about the Abcde-users mailing list