#include "ardour/export_handler.h"
-#include <glib/gstdio.h>
+#include <pbd/gstdio_compat.h>
#include <glibmm.h>
#include <glibmm/convert.h>
ExportHandler::~ExportHandler ()
{
- // TODO remove files that were written but not finished
+ graph_builder->cleanup (export_status->aborted () );
}
/** Add an export to the `to-do' list */
}
if (fmt->tag()) {
+ /* close file first, otherwise TagLib enounters an ERROR_SHARING_VIOLATION
+ * The process cannot access the file because it is being used.
+ *
+ * TODO: check Umlauts and encoding in filename.
+ * TagLib eventually calls CreateFileA(),
+ */
+ graph_builder->reset ();
AudiofileTagger::tag_file(filename, *SessionMetadata::Metadata());
}
string album_title = SessionMetadata::Metadata()->album();
if (barcode != "")
- status.out << "CATALOG " << barcode << endl;
+ 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 \"" << toc_escape_cdtext (album_artist) << "\"" << endl;
+ status.out << " PERFORMER " << toc_escape_cdtext (album_artist) << endl;
status.out << " }" << endl << "}" << endl;
}