mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 22:55:44 +01:00
Add CD Metadata "PERFORMER" & "TITLE" fields to .toc & .cue export
Add "PERFORMER" to the exported .toc & .cue files based on the value of the "album_artist" metadata field, and also use the value of the "album" field for the TITLE if is set, falling back to the session or range name if it is blank.
This commit is contained in:
parent
aca81bd894
commit
88146f0e3a
1 changed files with 27 additions and 8 deletions
|
|
@ -519,15 +519,26 @@ void
|
|||
ExportHandler::write_cue_header (CDMarkerStatus & status)
|
||||
{
|
||||
string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
|
||||
string catalog = SessionMetadata::Metadata()->catalog();
|
||||
|
||||
// Album metadata
|
||||
string barcode = SessionMetadata::Metadata()->barcode();
|
||||
string album_artist = SessionMetadata::Metadata()->album_artist();
|
||||
string album_title = SessionMetadata::Metadata()->album();
|
||||
|
||||
status.out << "REM Cue file generated by " << PROGRAM_NAME << endl;
|
||||
if (catalog != "")
|
||||
status.out << "CATALOG " << catalog << endl;
|
||||
|
||||
if (barcode != "")
|
||||
status.out << "CATALOG " << barcode << endl;
|
||||
|
||||
if (album_artist != "")
|
||||
status.out << "PERFORMER " << cue_escape_cdtext (album_artist) << endl;
|
||||
|
||||
if (album_title != "")
|
||||
title = album_title;
|
||||
|
||||
status.out << "TITLE " << cue_escape_cdtext (title) << endl;
|
||||
|
||||
/* The original cue sheet sepc metions five file types
|
||||
/* The original cue sheet spec mentions five file types
|
||||
WAVE, AIFF,
|
||||
BINARY = "header-less" audio (44.1 kHz, 16 Bit, little endian),
|
||||
MOTOROLA = "header-less" audio (44.1 kHz, 16 Bit, big endian),
|
||||
|
|
@ -559,15 +570,23 @@ void
|
|||
ExportHandler::write_toc_header (CDMarkerStatus & status)
|
||||
{
|
||||
string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
|
||||
string catalog = SessionMetadata::Metadata()->catalog();
|
||||
|
||||
if (catalog != "")
|
||||
status.out << "CATALOG " << catalog << endl;
|
||||
// Album metadata
|
||||
string barcode = SessionMetadata::Metadata()->barcode();
|
||||
string album_artist = SessionMetadata::Metadata()->album_artist();
|
||||
string album_title = SessionMetadata::Metadata()->album();
|
||||
|
||||
if (barcode != "")
|
||||
status.out << "CATALOG " << barcode << endl;
|
||||
|
||||
if (album_title != "")
|
||||
title = album_title;
|
||||
|
||||
status.out << "CD_DA" << endl;
|
||||
status.out << "CD_TEXT {" << endl << " LANGUAGE_MAP {" << endl << " 0 : EN" << endl << " }" << endl;
|
||||
status.out << " LANGUAGE 0 {" << endl << " TITLE " << toc_escape_cdtext (title) << endl ;
|
||||
status.out << " PERFORMER \"\"" << endl << " }" << endl << "}" << endl;
|
||||
status.out << " PERFORMER \"" << toc_escape_cdtext (album_artist) << "\"" << endl;
|
||||
status.out << " }" << endl << "}" << endl;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue