[Abcde-users] [PATCH 6/6] Add musicbrainz link to match choice diff

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


---
 abcde | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/abcde b/abcde
index 6144c03..c968bde 100755
--- a/abcde
+++ b/abcde
@@ -2941,6 +2941,10 @@ do_cddbedit ()
 									for PARSECHOICE in $(echo $CDDBCHOICE | tr , \ ); do
 										do_cddbparse "${ABCDETEMPDIR}/cddbread.$PARSECHOICE" \
 													 > "${ABCDETEMPDIR}/cddbread.parsechoice.$PARSECHOICE"
+										if [ "$(cat "${ABCDETEMPDIR}/datasource.$PARSECHOICE" | tr -d '\r\n')" = "Musicbrainz" ]; then
+											echo "https://musicbrainz.org/release/$(cat "${ABCDETEMPDIR}/mbid.$PARSECHOICE" | tr -d '\r\n')" \
+														>> "${ABCDETEMPDIR}/cddbread.parsechoice.$PARSECHOICE"
+										fi
 									done
 									echo "Showing diff between choices $PARSECHOICE1 and $PARSECHOICE2..." \
 										 > "${ABCDETEMPDIR}/cddbread.diff"
-- 
2.41.0




More information about the Abcde-users mailing list