summaryrefslogtreecommitdiff
path: root/libs/ardour/session_metadata.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-20 23:56:12 +0100
committerRobin Gareus <robin@gareus.org>2018-11-20 23:56:12 +0100
commitd169864b5bd08c9dbd064e8543ebd074e5695216 (patch)
tree2ebc2c31e6ee0f72cb5476d30fbb26045c41cce5 /libs/ardour/session_metadata.cc
parent0268489c7853780a91f289a409ec00c6e561526c (diff)
Prepare session-metadata export to external command
Diffstat (limited to 'libs/ardour/session_metadata.cc')
-rw-r--r--libs/ardour/session_metadata.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/ardour/session_metadata.cc b/libs/ardour/session_metadata.cc
index 61818422cf..fbe5222552 100644
--- a/libs/ardour/session_metadata.cc
+++ b/libs/ardour/session_metadata.cc
@@ -647,3 +647,29 @@ SessionMetadata::set_country (const string & v)
{
set_value ("user_country", v);
}
+
+void
+SessionMetadata::av_export_tag (MetaDataMap& meta) const
+{
+ if (year() > 0) {
+ std::ostringstream osstream; osstream << year();
+ meta["year"] = osstream.str();
+ }
+ if (track_number() > 0) {
+ std::ostringstream osstream; osstream << track_number();
+ meta["track"] = osstream.str();
+ }
+ if (disc_number() > 0) {
+ std::ostringstream osstream; osstream << disc_number();
+ meta["disc"] = osstream.str();
+ }
+ if (!title().empty()) { meta["title"] = title(); }
+ if (!artist().empty()) { meta["author"] = artist(); }
+ if (!album_artist().empty()) { meta["album_artist"] = album_artist(); }
+ if (!album().empty()) { meta["album"] = album(); }
+ if (!genre().empty()) { meta["genre"] = genre(); }
+ if (!composer().empty()) { meta["composer"] = composer(); }
+ if (!comment().empty()) { meta["comment"] = comment(); }
+ if (!copyright().empty()) { meta["copyright"] = copyright(); }
+ if (!subtitle().empty()) { meta["description"] = subtitle(); }
+}