+
+void ProjectList::processLogInfo(const QString &path, int *duration, const QString &log)
+{
+ int progress;
+ if (*duration == 0) {
+ if (log.contains("Duration:")) {
+ QString data = log.section("Duration:", 1, 1).section(',', 0, 0).simplified();
+ QStringList numbers = data.split(':');
+ *duration = (int) (numbers.at(0).toInt() * 3600 + numbers.at(1).toInt() * 60 + numbers.at(2).toDouble());
+ }
+ }
+ else if (log.contains("time=")) {
+ QString time = log.section("time=", 1, 1).simplified().section(' ', 0, 0);
+ if (time.contains(':')) {
+ QStringList numbers = time.split(':');
+ progress = numbers.at(0).toInt() * 3600 + numbers.at(1).toInt() * 60 + numbers.at(2).toDouble();
+ }
+ else progress = (int) time.toDouble();
+ setProxyStatus(path, CREATINGPROXY, (int) (100.0 * progress / (*duration)));
+ }
+}
+