Skip to content

Explicitly specify default ordering of segments listing#223

Merged
j616 merged 3 commits into
mainfrom
jamessa-segmentSort
Jul 8, 2026
Merged

Explicitly specify default ordering of segments listing#223
j616 merged 3 commits into
mainfrom
jamessa-segmentSort

Conversation

@j616

@j616 j616 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Details

Explicitly specify default ordering of segments listing

Issue (if relevant)

GitHub Issue: #219

Related PRs

Submitter PR Checks

  • PR completes task/fixes bug
  • API version has been incremented if necessary
  • ADR status has been updated, and ADR implementation has been recorded
  • Documentation updated (README, etc.)
  • PR added to Jira Issue (if relevant)
  • Follow-up stories added to Jira

Reviewer PR Checks

  • PR completes task/fixes bug
  • Design makes sense, and fits with our current code base
  • Code is easy to follow
  • PR size is sensible
  • Commit history is sensible and tidy

Info on PRs

The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.

@j616 j616 requested a review from a team as a code owner July 3, 2026 13:22

@samdbmg samdbmg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread api/TimeAddressableMediaStore.yaml Outdated

It may also use a subset of the samples in the Media Object, and if the `include_object_timerange=true` parameter is set, the object's timerange will also be returned to aid identifying which samples to skip.

Segments are sorted by ascending timerange by default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Does this read better?

Suggested change
Segments are sorted by ascending timerange by default.
Segments are sorted by timerange, in ascending order by default.

Also do we need a reminder that it doesn't matter whether you sort by timerange start or end: the result is the same because they cannot overlap?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that. I couldn't decide if it was stating the obvious or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this over the weekend, I've added in a note on the sort key. Further explanation isn't a bad thing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also included a note about edge cases involving clusivity markers.

Co-authored-by: Sam Mesterton-Gibbons <sam.mesterton-gibbons@bbc.co.uk>
@j616 j616 force-pushed the jamessa-segmentSort branch 2 times, most recently from 17c5873 to fc660f2 Compare July 6, 2026 10:18
@j616 j616 requested a review from samdbmg July 6, 2026 13:19

@samdbmg samdbmg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I agree on your point about more explanation - and good thought on edge cases

@j616 j616 merged commit 8cd1ca5 into main Jul 8, 2026
8 checks passed
@j616 j616 deleted the jamessa-segmentSort branch July 8, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants