diff --git a/sync-music/sync-music.lisp b/sync-music/sync-music.lisp index 1e8bebc..ba24c14 100644 --- a/sync-music/sync-music.lisp +++ b/sync-music/sync-music.lisp @@ -42,6 +42,10 @@ extension equality." :with cd-cd-text := (libcue:cd-get-cd-text cd) :with album-date := (libcue:ensure-nonempty (libcue:get-rem :date cd-rem)) + :with album-gain := (libcue:ensure-nonempty + (libcue:get-rem :album-gain cd-rem)) + :with album-peak := (libcue:ensure-nonempty + (libcue:get-rem :album-peak cd-rem)) :with album-title := (libcue:get-cd-text :title cd-cd-text) :with album-artist := (libcue:ensure-nonempty (libcue:get-cd-text :performer cd-cd-text)) @@ -63,6 +67,10 @@ extension equality." :for track-date := (or (libcue:ensure-nonempty (libcue:get-rem :date track-rem)) album-date) + :for track-gain := (libcue:ensure-nonempty + (libcue:get-rem :track-gain track-rem)) + :for track-peak := (libcue:ensure-nonempty + (libcue:get-rem :track-peak track-rem)) :for track-title := (libcue:get-cd-text :title track-cd-text) :for track-artist := (or (libcue:ensure-nonempty (libcue:get-cd-text :performer track-cd-text)) @@ -85,7 +93,11 @@ extension equality." (add-metadata "ARTIST" track-artist) (add-metadata "COMPOSER" track-composer) (add-metadata "GENRE" track-genre) - (add-metadata "DATE" track-date)) + (add-metadata "DATE" track-date) + (add-metadata "REPLAYGAIN_ALBUM_GAIN" album-gain) + (add-metadata "REPLAYGAIN_ALBUM_PEAK" album-peak) + (add-metadata "REPLAYGAIN_TRACK_GAIN" track-gain) + (add-metadata "REPLAYGAIN_TRACK_PEAK" track-peak)) metadata) :for output-file-name := (format nil "~A - ~A"