projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to clean up KDM creation code a bit.
[dcpomatic.git]
/
src
/
lib
/
send_kdm_email_job.cc
diff --git
a/src/lib/send_kdm_email_job.cc
b/src/lib/send_kdm_email_job.cc
index 541307f5acc8ace90d682b5b396046ddcdcbab2e..926ff6ee8cdfaf293b3808d3902bce947a99ae2b 100644
(file)
--- a/
src/lib/send_kdm_email_job.cc
+++ b/
src/lib/send_kdm_email_job.cc
@@
-20,7
+20,7
@@
#include "send_kdm_email_job.h"
#include "compose.hpp"
#include "film.h"
#include "send_kdm_email_job.h"
#include "compose.hpp"
#include "film.h"
-#include "
kdm
.h"
+#include "
cinema_kdms
.h"
#include "i18n.h"
#include "i18n.h"
@@
-29,16
+29,16
@@
using std::list;
using boost::shared_ptr;
SendKDMEmailJob::SendKDMEmailJob (
using boost::shared_ptr;
SendKDMEmailJob::SendKDMEmailJob (
- shared_ptr<const Film> f,
+ shared_ptr<const Film> f
ilm
,
list<shared_ptr<Screen> > screens,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
+ boost::filesystem::path
cpl
,
boost::posix_time::ptime from,
boost::posix_time::ptime to,
dcp::Formulation formulation
)
boost::posix_time::ptime from,
boost::posix_time::ptime to,
dcp::Formulation formulation
)
- : Job (f)
+ : Job (f
ilm
)
, _screens (screens)
, _screens (screens)
- , _
dcp (dcp
)
+ , _
cpl (cpl
)
, _from (from)
, _to (to)
, _formulation (formulation)
, _from (from)
, _to (to)
, _formulation (formulation)
@@
-52,16
+52,29
@@
SendKDMEmailJob::name () const
return String::compose (_("Email KDMs for %1"), _film->name());
}
return String::compose (_("Email KDMs for %1"), _film->name());
}
+string
+SendKDMEmailJob::json_name () const
+{
+ return N_("send_kdm_email");
+}
+
void
SendKDMEmailJob::run ()
{
try {
void
SendKDMEmailJob::run ()
{
try {
-
+
set_progress_unknown ();
set_progress_unknown ();
- email_kdms (_film, _screens, _dcp, _from, _to, _formulation);
+
+ CinemaKDMs::email (
+ _film,
+ CinemaKDMs::collect (ScreenKDM::collect (_screens, _film->make_kdms (_screens, _cpl, _from, _to, _formulation))),
+ _from,
+ _to
+ );
+
set_progress (1);
set_state (FINISHED_OK);
set_progress (1);
set_state (FINISHED_OK);
-
+
} catch (std::exception& e) {
set_progress (1);
} catch (std::exception& e) {
set_progress (1);