Skip to content

Media Sorting Improvement#16425

Open
Leo-Berman wants to merge 9 commits intonextcloud:masterfrom
Leo-Berman:master
Open

Media Sorting Improvement#16425
Leo-Berman wants to merge 9 commits intonextcloud:masterfrom
Leo-Berman:master

Conversation

@Leo-Berman
Copy link

@Leo-Berman Leo-Berman commented Feb 1, 2026

  • Tests written, or not not needed

@Leo-Berman Leo-Berman marked this pull request as ready for review February 2, 2026 20:27
@Leo-Berman Leo-Berman force-pushed the master branch 3 times, most recently from b781830 to 66753a0 Compare February 3, 2026 19:03
@Leo-Berman
Copy link
Author

maybe this can't be done in the frontend because if we load by timestamp in the database part then the sections will be loaded weirdly anyways?

@Leo-Berman
Copy link
Author

I made a change so it loads everything all at once which saves the categories but I don't really understand exactly the load it places

@christianlupus
Copy link

Cross-linking discussion from forum here: https://help.nextcloud.com/t/first-pull-request-help-regarding-testing/239607

@tobiasKaminsky, maybe you can have a quick look at this if something like it would be a good idea to implement. Then, maybe you could either give some good advice on what is needed to get this merged or what would be needed to have good chances? Thanks a lot!

@Leo-Berman Leo-Berman force-pushed the master branch 4 times, most recently from fe232eb to e54d87d Compare February 15, 2026 15:21
@Leo-Berman
Copy link
Author

Hi @alperozturk96 or @tobiasKaminsky I did some more work to make sure the code analysis was passing if that was a blocker. Let me know if there is anything else you'd like for me to do? Would this being a setting make it more likely to make it into master? I'm not super pressed about it, but it's more convenient for me so I don't have to keep building myself an SDK, so if there is a relatively easy way for this to happen that'd be great, and I'm willing to do a bit more work for it!

@github-actions
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

- Add extractFolderDate to parse YYYY/MM or YYYY/MM/DD from file paths
- Sort gallery items by folder date first, then modification timestamp
- Group gallery sections by month using folder date when available
- Add unit tests for folder date extraction

Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Signed-off-by: Leo Berman <leograntberman@gmail.com>
Copy link
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

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

Hello

Thank you for the PR.

private long endDate;
private int limit = 150;
// Use 0 for unlimited - fetch all metadata at once; thumbnails load lazily
private int limit = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This may introduce unforeseen side effects on slow and very large instances, as forcing SearchRemoteOperation to fetch everything could cause performance issues.

@tobiasKaminsky Please share your thoughts as well.

Copy link
Author

Choose a reason for hiding this comment

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

I have tried with my local bench, but I think it would have to be so many images before this meta data loading actually started to be a bottleneck. Of course it's just a hunch, I'm not sure what metrics to look at

Signed-off-by: Leo Berman <leograntberman@gmail.com>
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

Comments