X-Git-Url: https://git.hcoop.net/clinton/abcde.git/blobdiff_plain/e1b59b02e02ef1b397d3c09c633f83c5a83af5fb..3a072eba15da92f5c550811c008c2eb36ddf670d:/abcddb-tool?ds=sidebyside diff --git a/abcddb-tool b/abcddb-tool index 218e75a..3701916 100755 --- a/abcddb-tool +++ b/abcddb-tool @@ -120,19 +120,26 @@ of (disc-number . tag-value)" ;; Not exported CDDBGENRE intentionally, since it appears unused (format out "DISCID=$'~A'~%DALBUM=$'~A'~%DARTIST=$'~A'~%CDYEAR=$'~A'~%" (escape-for-shell (car (disc-query 'DISCID))) - (escape-for-shell artist) (escape-for-shell album) + (escape-for-shell artist) (escape-for-shell (car (disc-query 'YEAR)))) ;; Store genre(s) in a bash array. mp3s will just have to live with ;; using the first, but Vorbis/FLAC can handle an arbitrary set of ;; genres - (format out "DGENRE=(~{$'~A' ~})~%" (map escape-for-shell (disc-query 'GENRE))) + (format out "CDGENRE=(~{$'~A' ~})~%" (map escape-for-shell (disc-query 'GENRE))) (format out "~:{TRACK~A=$'~A'~%~}" (map (lambda (ttitle) (list (1+ (first ttitle)) (escape-for-shell (second ttitle)))) (cddb-query-tracks cddb 'TITLE))))) +(define (main args) + (cond ((string= (second args) "parse") + (call-with-input-file (third args) + (lambda (f) (cddb->export (read-cddb f))))) + (else + (apply execlp "cddb-tool" args)))) - +(when (batch-mode?) + (exit (main (program-arguments)))) \ No newline at end of file