summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2014-05-27 11:22:59 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2014-06-12 23:20:05 +0100
commit70308f51747b5beeff99dec9f10490080f00b0c2 (patch)
tree4a0c5576e11e4f0c9f2f924f83e5f70739d39e00
parent724a69a8d554151f3d1ec4bed03c6c4ab6f11eed (diff)
Post-export hook tweaks
Remove the Soundcloud username & password from the parameter substitutions passed to the post-export hook: having thought about this now, I can't actually think of a case where these are of any use at all. In compensation, add %s and %n parameters that expand to the session directory and name - maybe people will think of uses for these.
-rw-r--r--gtk2_ardour/export_format_dialog.cc2
-rw-r--r--libs/ardour/export_handler.cc13
2 files changed, 7 insertions, 8 deletions
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index b4d266c43e..a6d3282ce8 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -51,7 +51,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
silence_end_checkbox (_("Add silence at end:")),
silence_end_clock ("silence_end", true, "", true, false, true),
- command_label(_("Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename, %u=username, %p=password):")),
+ command_label(_("Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename):")),
format_table (3, 4),
compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT),
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 89e4d96955..4368d54430 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -314,20 +314,19 @@ ExportHandler::finish_timespan ()
#if 0 // would be nicer with C++11 initialiser...
std::map<char, std::string> subs {
{ 'f', filename },
- { 'd', Glib::path_get_dirname(filename) },
+ { 'd', Glib::path_get_dirname(filename) + G_DIR_SEPARATOR },
{ 'b', PBD::basename_nosuffix(filename) },
- { 'u', upload_username },
- { 'p', upload_password}
+ ...
};
#endif
PBD::ScopedConnection command_connection;
std::map<char, std::string> subs;
subs.insert (std::pair<char, std::string> ('f', filename));
- subs.insert (std::pair<char, std::string> ('d', Glib::path_get_dirname(filename)));
- subs.insert (std::pair<char, std::string> ('b', PBD::basename_nosuffix(filename)));
- subs.insert (std::pair<char, std::string> ('u', soundcloud_username));
- subs.insert (std::pair<char, std::string> ('p', soundcloud_password));
+ subs.insert (std::pair<char, std::string> ('d', Glib::path_get_dirname (filename) + G_DIR_SEPARATOR));
+ subs.insert (std::pair<char, std::string> ('b', PBD::basename_nosuffix (filename)));
+ subs.insert (std::pair<char, std::string> ('s', session.path ()));
+ subs.insert (std::pair<char, std::string> ('n', session.name ()));
std::cerr << "running command: " << fmt->command() << "..." << std::endl;