Make Soundcloud upload applicable to any export format.

Add soundcloud_upload property back into ExportFormatSpecification, but
instead of making it settable in the export format specification dialog,
add a tick-box in each tab of ExportFileNotebook to allow setting it.
This commit is contained in:
Colin Fletcher 2014-05-23 18:14:37 +01:00 committed by Paul Davis
parent 3e1f1630d8
commit eec3f494ec
4 changed files with 37 additions and 1 deletions

View file

@ -96,6 +96,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
void set_tag (bool tag_it) { _tag = tag_it; }
void set_with_cue (bool yn) { _with_cue = yn; }
void set_with_toc (bool yn) { _with_toc = yn; }
void set_soundcloud_upload (bool yn) { _soundcloud_upload = yn; }
void set_command (std::string command) { _command = command; }
void set_silence_beginning (AnyTime const & value) { _silence_beginning = value; }
@ -126,6 +127,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
float normalize_target () const { return _normalize_target; }
bool with_toc() const { return _with_toc; }
bool with_cue() const { return _with_cue; }
bool soundcloud_upload() const { return _soundcloud_upload; }
std::string command() const { return _command; }
bool tag () const { return _tag && supports_tagging; }
@ -176,6 +178,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
float _normalize_target;
bool _with_toc;
bool _with_cue;
bool _soundcloud_upload;
std::string _command;
/* serialization helpers */

View file

@ -339,7 +339,7 @@ ExportHandler::finish_timespan ()
delete (se);
}
if (fmt->upload()) {
if (fmt->soundcloud_upload()) {
SoundcloudUploader *soundcloud_uploader = new SoundcloudUploader;
std::string token = soundcloud_uploader->Get_Auth_Token(upload_username, upload_password);
std::cerr