Skip to content

use file name as second order sort when sorting by creation date #19892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

F-Node-Karlsruhe
Copy link

@F-Node-Karlsruhe F-Node-Karlsruhe commented Jul 11, 2025

Description

Whenever a sort is executed by creation date use file name as second order in the same direction.

Fixes # (issue)

#14306

How Has This Been Tested?

  • sorting test

Screenshots (if appropriate)

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/)

Copy link
Contributor

github-actions bot commented Jul 11, 2025

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

@bo0tzz
Copy link
Member

bo0tzz commented Jul 12, 2025

If we're going to be sorting by more than just the main timestamp field, we should probably also consider EXIF data like ordering IDs and such.

@F-Node-Karlsruhe
Copy link
Author

If we're going to be sorting by more than just the main timestamp field, we should probably also consider EXIF data like ordering IDs and such.

Afaiu. fileCreatedAt refers to the EXIF creation date. Mhh, good point but one should be carefull introducing too many sorts as they can be expensive. Could you give an example how and when id sort should come into play?

Signed-off-by: F-Node-Karlsruhe <[email protected]>
@F-Node-Karlsruhe F-Node-Karlsruhe marked this pull request as ready for review July 12, 2025 11:58
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.

2 participants