/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
json << "\"dcp\": \"" << (*i)->film()->dcp_name() << "\", ";
}
- json << "\"name\": \"" << (*i)->json_name() << "\", "
- << "\"progress\": " << (*i)->progress () << ", "
- << "\"status\": \"" << (*i)->json_status() << "\"";
+ json << "\"name\": \"" << (*i)->json_name() << "\", ";
+ if ((*i)->progress ()) {
+ json << "\"progress\": " << (*i)->progress().get() << ", ";
+ } else {
+ json << "\"progress\": unknown, ";
+ }
+ json << "\"status\": \"" << (*i)->json_status() << "\"";
json << " }";
list<shared_ptr<Job> >::iterator j = i;