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

kobotoolbox / kpi / 27623220260
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-2271-inactive-users-filter-timesout
DEFAULT BRANCH: master
Ran 16 Jun 2026 02:07PM UTC
Jobs 10
Files 886
Run time 3min
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: 81.623% (+0.04%) from 81.585%
27623220260

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.

9055 of 12291 branches covered (73.67%)

46 of 86 new or added lines in 7 files covered. (53.49%)

439 existing lines in 19 files now uncovered.

29746 of 36443 relevant lines covered (81.62%)

5.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
19
48.65
kpi/views/v2/attachment_audio_duration.py
18
28.0
kpi/utils/audio_duration.py
3
80.0
kpi/serializers/v2/attachment_audio_duration.py

Coverage Regressions

Lines Coverage ∆ File
81
0.0
-93.1% kobo/apps/stripe/serializers.py
75
0.0
-41.9% kobo/apps/stripe/views.py
64
27.2
-51.2% kobo/apps/stripe/utils/subscription_limits.py
63
0.0
-51.64% kobo/apps/stripe/models.py
36
20.21
-38.3% kobo/apps/stripe/utils/billing_dates.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
16
84.8
-2.93% kobo/apps/openrosa/libs/utils/logger_tools.py
16
31.82
-36.36% kobo/apps/stripe/utils/limit_enforcement.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
11
0.0
-44.0% kobo/apps/stripe/signals.py
9
0.0
-29.03% kobo/apps/stripe/utils/manual_subscription.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
6
0.0
-100.0% kobo/apps/stripe/exceptions.py
6
0.0
-37.5% kobo/apps/stripe/utils/view_utils.py
3
31.43
-2.86% kobo/apps/organizations/admin/organization.py
3
61.21
-1.82% kobo/apps/organizations/models.py
3
60.53
-7.89% kobo/apps/organizations/utils.py
1
92.31
-7.69% kobo/apps/user_reports/utils/migrations.py
Jobs
ID Job ID Ran Files Coverage
1 27623220260.1 16 Jun 2026 02:07PM UTC 882
50.17
2 27623220260.2 16 Jun 2026 02:07PM UTC 882
44.92
3 27623220260.3 16 Jun 2026 02:08PM UTC 882
53.54
4 27623220260.4 16 Jun 2026 02:09PM UTC 884
54.83
5 27623220260.5 16 Jun 2026 02:10PM UTC 884
46.31
6 27623220260.6 16 Jun 2026 02:10PM UTC 884
66.48
7 27623220260.7 16 Jun 2026 02:11PM UTC 884
51.53
8 27623220260.8 16 Jun 2026 02:11PM UTC 882
59.56
9 27623220260.9 16 Jun 2026 02:12PM UTC 886
68.83
10 27623220260.10 16 Jun 2026 02:12PM UTC 884
60.74
Source Files on build 27623220260
  • Tree
  • List 886
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 4aa8c8fe on github
  • Prev Build on main (#27608652545)
  • Next Build on main (#27642186403)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc