projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy up careful_string_filter and add some extra transliterations.
[dcpomatic.git]
/
src
/
lib
/
upload_job.cc
diff --git
a/src/lib/upload_job.cc
b/src/lib/upload_job.cc
index ec474abdfd49879517b92243ded556fbea60fa84..113e3a7e88bd8740456b6e8a30b7ace771f38621 100644
(file)
--- a/
src/lib/upload_job.cc
+++ b/
src/lib/upload_job.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2012-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-20
21
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,22
+18,25
@@
*/
*/
+
/** @file src/upload_job.cc
* @brief A job to copy DCPs to a server using libcurl.
*/
/** @file src/upload_job.cc
* @brief A job to copy DCPs to a server using libcurl.
*/
+
#include "compose.hpp"
#include "compose.hpp"
-#include "upload_job.h"
#include "config.h"
#include "config.h"
-#include "
log
.h"
+#include "
curl_uploader
.h"
#include "dcpomatic_log.h"
#include "film.h"
#include "dcpomatic_log.h"
#include "film.h"
+#include "log.h"
#include "scp_uploader.h"
#include "scp_uploader.h"
-#include "
curl_uploader
.h"
+#include "
upload_job
.h"
#include <iostream>
#include "i18n.h"
#include <iostream>
#include "i18n.h"
+
using std::string;
using std::min;
using std::shared_ptr;
using std::string;
using std::min;
using std::shared_ptr;
@@
-42,6
+45,7
@@
using boost::scoped_ptr;
using namespace boost::placeholders;
#endif
using namespace boost::placeholders;
#endif
+
UploadJob::UploadJob (shared_ptr<const Film> film)
: Job (film)
, _status (_("Waiting"))
UploadJob::UploadJob (shared_ptr<const Film> film)
: Job (film)
, _status (_("Waiting"))
@@
-49,23
+53,27
@@
UploadJob::UploadJob (shared_ptr<const Film> film)
}
}
+
UploadJob::~UploadJob ()
{
stop_thread ();
}
UploadJob::~UploadJob ()
{
stop_thread ();
}
+
string
UploadJob::name () const
{
return _("Copy DCP to TMS");
}
string
UploadJob::name () const
{
return _("Copy DCP to TMS");
}
+
string
UploadJob::json_name () const
{
return N_("upload");
}
string
UploadJob::json_name () const
{
return N_("upload");
}
+
void
UploadJob::run ()
{
void
UploadJob::run ()
{
@@
-88,17
+96,19
@@
UploadJob::run ()
set_state (FINISHED_OK);
}
set_state (FINISHED_OK);
}
+
string
UploadJob::status () const
{
boost::mutex::scoped_lock lm (_status_mutex);
string
UploadJob::status () const
{
boost::mutex::scoped_lock lm (_status_mutex);
-
string
s = Job::status ();
- if (!_status.empty
() && !finished_in_error
()) {
+
auto
s = Job::status ();
+ if (!_status.empty
() && !finished_in_error
()) {
s += N_("; ") + _status;
}
return s;
}
s += N_("; ") + _status;
}
return s;
}
+
void
UploadJob::set_status (string s)
{
void
UploadJob::set_status (string s)
{