Skip to content

Conversation

@meesfrensel
Copy link
Contributor

Description

Currently, duration is either null or '00:00:00.000' depending on which api endpoint you use. For example GET /assets/{id} returns a non-null string while GET /timeline/bucket 's duration can be nullable.

How Has This Been Tested?

Standard test suite + manually inspecting api responses.

API Changes

The AssetResponseDto dto used in many places now has nullable duration.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

None

@immich-push-o-matic
Copy link

immich-push-o-matic bot commented Dec 5, 2025

Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile, 🖥️web, 🗄️server. A maintainer will add the required label.

Copy link
Member

@mertalev mertalev left a comment

Choose a reason for hiding this comment

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

I agree with using null instead, but this is a breaking change, right? We'd need to leave this for the eventual 3.0.

@meesfrensel
Copy link
Contributor Author

I think you're right, would be a breaking change for api/sdk users. Hmm that's really annoying, since it's supposed to remove the need for these dumb !includes(00:00:00.000) checks, not break anyones workflow 😅

If you decide it's definitely a breaking v3.0 change, let me know if you want to keep the pr open or not!

@danieldietzler
Copy link
Member

This is definitely a breaking change, since the API contract (duration is not nullable) has been broken. I would personally say it's fine to keep this around for the time being

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants