From b055b655a82874af5f5480ac5c89b3b0b8e7d058 Mon Sep 17 00:00:00 2001 From: chmaha Date: Sun, 26 Nov 2023 15:40:11 +0000 Subject: [PATCH] CUE generation: Add CATALOG if present in @ album metadata marker --- PDF_Guide/ReaClassical User Guide.pdf | Bin 961560 -> 961560 bytes ReaClassical/ReaClassical.lua | 4 +-- .../ReaClassical_mpl_Markers to CUE.lua | 32 +++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/PDF_Guide/ReaClassical User Guide.pdf b/PDF_Guide/ReaClassical User Guide.pdf index ed78c4fc77953d1611b0834a10eaf2356448deb6..5b8ff3e805bef93aa2d45f7753a345fb840d693b 100644 GIT binary patch delta 177 zcmbPn!)nG2s|lYNGd6x!W@oWm-l)e=j`feX6$He=;~tXXzA)|YG7z& dU|?xv>1O0;Vdi9N;%KK}LrBT?>J@x*nE}55E3p6o delta 177 zcmbPn!)nG2s|lYN3pRdMW@phn-l*Ix#nCRs!3e}mK+FupEI`Z(#B4y!4#XgNP9Ww2 zVs0Sj0b<_mQXG7Y6Il(7O^i*aE6n7RfH1e)&gA>e=WK3hVdU)W>TGCY;bLK8>f~x+ d;AUds>||zPYUt=>W@)EjLrBT?>J@x*nE}XjE8zeD diff --git a/ReaClassical/ReaClassical.lua b/ReaClassical/ReaClassical.lua index 21b15835..6e3c57f7 100644 --- a/ReaClassical/ReaClassical.lua +++ b/ReaClassical/ReaClassical.lua @@ -1,8 +1,8 @@ @description ReaClassical @author chmaha -@version 24.1pre4 +@version 24.1pre5 @changelog - Ensure that the final region doesn't include a "!" in the name if a pregap exists before it + CUE generation: Add CATALOG to top of CUE file if present in the album metadata @ marker @metapackage @provides [main] ReaClassical_Add Destination IN marker.lua diff --git a/ReaClassical/ReaClassical_mpl_Markers to CUE.lua b/ReaClassical/ReaClassical_mpl_Markers to CUE.lua index f632219c..6fddcefb 100644 --- a/ReaClassical/ReaClassical_mpl_Markers to CUE.lua +++ b/ReaClassical/ReaClassical_mpl_Markers to CUE.lua @@ -100,15 +100,29 @@ function create_string(fields, num_of_markers, extension) local _, _, raw_pos_out, _, name_out = EnumProjectMarkers2(0, num_of_markers - 1) album_length = format_time(raw_pos_out) - - local out_str = - 'REM GENRE ' .. fields[1] .. - '\nREM DATE ' .. fields[2] .. - '\nREM ALBUM_LENGTH ' .. album_length .. - '\nPERFORMER ' .. '"' .. fields[3] .. '"' .. - '\nTITLE ' .. '"' .. fields[4] .. '"' .. - '\nFILE ' .. '"' .. fields[5] .. '"' .. ' ' .. format .. '\n' - + local _, _, _, _, album_meta = EnumProjectMarkers2(0, num_of_markers - 2) + catalog_number = album_meta:match('CATALOG=([%w%d]+)') or "" + local out_str = "" + + if catalog_number ~= "" then + out_str = + 'REM GENRE ' .. fields[1] .. + '\nREM DATE ' .. fields[2] .. + '\nREM ALBUM_LENGTH ' .. album_length .. + '\nCATALOG ' .. catalog_number .. + '\nPERFORMER ' .. '"' .. fields[3] .. '"' .. + '\nTITLE ' .. '"' .. fields[4] .. '"' .. + '\nFILE ' .. '"' .. fields[5] .. '"' .. ' ' .. format .. '\n' + else + out_str = + 'REM GENRE ' .. fields[1] .. + '\nREM DATE ' .. fields[2] .. + '\nREM ALBUM_LENGTH ' .. album_length .. + '\nPERFORMER ' .. '"' .. fields[3] .. '"' .. + '\nTITLE ' .. '"' .. fields[4] .. '"' .. + '\nFILE ' .. '"' .. fields[5] .. '"' .. ' ' .. format .. '\n' + end + local ind3 = ' ' local ind5 = ' '