diff --git a/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue b/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue
index dc6bbd4a..3fb70f47 100644
--- a/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue
+++ b/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue
@@ -65,7 +65,7 @@
- {{ scanData.number_of_images }} images
- created: {{ formatDate(scanData.created) }}
- - duration: {{ scanData.duration }}
+ - duration: {{ formatDuration(scanData.duration) }}
- Not enough images to stitch
@@ -129,6 +129,22 @@ export default {
.padStart(2, "0");
return `${HH}:${MM} ${dd}/${mm}/${yyyy}`;
},
+ formatDuration(duration) {
+ const match = duration.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);
+
+ if (!match) return "00:00:00";
+
+ const hours = parseInt(match[1] || 0, 10);
+ const minutes = parseInt(match[2] || 0, 10);
+ const seconds = parseInt(match[3] || 0, 10);
+
+ // Format to HH:MM:SS with leading zeros
+ return [
+ String(hours).padStart(2, "0"),
+ String(minutes).padStart(2, "0"),
+ String(seconds).padStart(2, "0"),
+ ].join(":");
+ },
requestViewer() {
// Notify parent that thumbnail was clicked
if (!this.ongoing) {