mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Strava Download - Map VirtualRun and VirtualRide to Run and Ride
Use SubSport to preserve the original type when Sport is mapped. Fixes #3278
This commit is contained in:
@@ -862,10 +862,12 @@ Strava::prepareResponse(QByteArray* data)
|
||||
// what sport?
|
||||
if (!each["type"].isNull()) {
|
||||
QString stype = each["type"].toString();
|
||||
if (stype == "Ride") ride->setTag("Sport", "Bike");
|
||||
else if (stype == "Run") ride->setTag("Sport", "Run");
|
||||
else if (stype == "Swim") ride->setTag("Sport", "Swim");
|
||||
if (stype.endsWith("Ride")) ride->setTag("Sport", "Bike");
|
||||
else if (stype.endsWith("Run")) ride->setTag("Sport", "Run");
|
||||
else if (stype.endsWith("Swim")) ride->setTag("Sport", "Swim");
|
||||
else ride->setTag("Sport", stype);
|
||||
// Set SubSport to preserve the original when Sport was mapped
|
||||
if (stype != ride->getTag("Sport", "")) ride->setTag("SubSport", stype);
|
||||
}
|
||||
|
||||
if (each["device_name"].toString().length()>0)
|
||||
|
||||
Reference in New Issue
Block a user