Skip to content

Commit

Permalink
CUE generation: Add CATALOG if present in @ album metadata marker
Browse files Browse the repository at this point in the history
  • Loading branch information
chmaha committed Nov 26, 2023
1 parent c8c1b82 commit b055b65
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
Binary file modified PDF_Guide/ReaClassical User Guide.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions ReaClassical/ReaClassical.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 23 additions & 9 deletions ReaClassical/ReaClassical_mpl_Markers to CUE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ' '

Expand Down

0 comments on commit b055b65

Please sign in to comment.