• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 27623220260 / 4
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 16 Jun 2026 02:09PM UTC
Files 884
Run time 37s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2026 02:03PM UTC coverage: 54.832% (+1.3%) from 53.545%
27623220260.4

push

github

web-flow
feat(api): add endpoint to return the total length of all audio DEV-2254 (#7151)

### 📣 Summary
This PR adds a new endpoint that returns the duration of audio
attachments, allowing the front-end to calculate total transcription
time without downloading and processing each file.

### 📖 Description
This PR introduces a new endpoint, `POST
/api/v2/assets/{asset_uid}/attachments/audio-duration/`, which accepts a
list of attachment UIDs and returns the duration of each audio file
along with the total duration.

A new `audio_length` field has been added to the `Attachment` model to
cache audio durations. When a request is made:

* If `Attachment.audio_length` is already populated, the stored value is
returned directly.
* Otherwise, the duration is extracted using `ffprobe`, saved to
`audio_length`, and then returned in the response.

This caching mechanism improves performance and avoids repeatedly
processing the same files. The endpoint also returns per-attachment
durations to support future front-end features that may need to display
file-level duration information.

5180 of 12165 branches covered (42.58%)

19937 of 36360 relevant lines covered (54.83%)

0.55 hits per line

Source Files on job 27623220260.4
  • Tree
  • List 884
  • Changed 26
  • Source Changed 0
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 27623220260
  • 4aa8c8fe on github
  • Prev Job for on main (#27608652545.2)
  • Next Job for on main (#27642186403.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc