Train View: Improved the selection of workouts (#4400)

Added support to
* filter workouts by multiple metrics
* rate and tag workouts
* view detailed information about the selected workout
* Preserving user-content in trainDB on rescan for workouts
Fixes #411
This commit is contained in:
Joachim Kohlhammer
2024-05-20 18:57:58 +02:00
committed by GitHub
parent cfb8c2f6da
commit 77df5b372c
78 changed files with 8168 additions and 937 deletions

View File

@@ -261,8 +261,8 @@ TodaysPlanWorkoutDownload::downloadFiles()
QString filename;
ErgFile *p = ErgFile::fromContent(content, context);
if (p->Filename != "") {
filename = workoutDir + "/TP-" + p->Filename.replace("/", "-").simplified();
if (p->originalFilename() != "") {
filename = workoutDir + "/TP-" + p->originalFilename().replace("/", "-").simplified();
} else {
filename = workoutDir + "/TP-Workout-" + current->text(1).replace(" ", "_") + ".erg";
}
@@ -298,7 +298,7 @@ TodaysPlanWorkoutDownload::downloadFiles()
downloads++;
current->setText(5, tr("Saved")); QApplication::processEvents();
trainDB->importWorkout(filename, p); // add to library
trainDB->importWorkout(filename, *p); // add to library
} else {