diff --git a/src/Cloud/Nolio.cpp b/src/Cloud/Nolio.cpp index ac4a8de62..e765859be 100644 --- a/src/Cloud/Nolio.cpp +++ b/src/Cloud/Nolio.cpp @@ -28,7 +28,7 @@ #include #ifndef NOLIO_DEBUG -#define NOLIO_DEBUG true +#define NOLIO_DEBUG false #endif #ifdef Q_CC_MSVC #define printd(fmt, ...) do { \ @@ -115,6 +115,7 @@ bool Nolio::open(QStringList &errors){ if (reply->error() != 0) { printd("Got error %d\n", reply->error()); + errors << reply->errorString(); return false; } QByteArray r = reply->readAll(); @@ -254,6 +255,8 @@ QByteArray* Nolio::prepareResponse(QByteArray* data){ QJsonObject activity = document.object(); QDateTime start_time = QDateTime::fromString(activity["date_start"].toString(), Qt::ISODate); RideFile *ride = new RideFile(start_time.toUTC(), 1.0f); + // The device type is unknown + ride->setDeviceType("Nolio"); // set nolio id in metadata if (!activity["nolio_id"].isNull()) ride->setTag("NolioID", QString("%1").arg(activity["id"].toVariant().toULongLong())); // set sport and subsport diff --git a/src/Cloud/Nolio.h b/src/Cloud/Nolio.h index 30c56f26e..b3a0c67a1 100644 --- a/src/Cloud/Nolio.h +++ b/src/Cloud/Nolio.h @@ -43,6 +43,7 @@ class Nolio : public CloudService { bool open(QStringList &errors); bool close(); + virtual int capabilities() const { return OAuth | Download | Query; } // home directory QString home();