-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(server): library cleanup from ui #16226
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
Conversation
e5c7bcc to
c886ca8
Compare
danieldietzler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems sensible to me, thanks!
c886ca8 to
312b060
Compare
312b060 to
5197982
Compare
…p/immich into fix/scan-all-libraries
09f94a8 to
7c7fa5c
Compare
| "library_settings": "External Library", | ||
| "library_settings_description": "Manage external library settings", | ||
| "library_tasks_description": "Perform library tasks", | ||
| "library_tasks_description": "Scan external libraries for new and/or changed assets", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could expand this description a little more. Giving the details of all the actions of the job. Quite a few people have questions about what this job actually does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably something that should go in the docs not the English translation of something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When seeing this job and the library's options on the library page, it is unclear when you should use which.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When seeing this job and the library's options on the library page, it is unclear when you should use which.
I agree and I first tried to have no button on the library job page since it wasn't very intuitive. Right now, though, the code requires it to compile.
Maybe I should just do the needed change to remove the button?
Longer term, I would like to move the various and often-confusing buttons from the jobs page to a more dedicated repair page. That page would show if there are assets missing thumbnails, missing metadata, ML etcetera, with a friendly button to fix. We could also stop showing assets without thumbs in the timeline altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should just do the needed change to remove the button?
Does this button ultimately run the scan command on all libraries? If yes, I guess we just need to clarify that in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will run the scan on all libraries, and also run the check for pending library deletions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a screenshot to the PR description
Deleting a large external library is slow and fragile. Often, assets end up getting stuck and the library lingers on in a limbo state. This is annoying for the user because the library isn't listed in the library managment, but yet (potentially thousands) of assets hang around in the timeline.
We have a daily cron job set up to clean up pending library deletions, but there is no way to trigger this manually.
In the backend, the cleanup is triggered by the job that scans all libraries, but not the individual library scans.
In the frontend, we have a button that scans all libraries, but it enumerates all libraries and individually scans them instead of calling the backend which would also queue the cleanup.
This PR makes the scan button call the job for libraries, which in turn calls the refresh all job.
When the user presses "Scan all libraries" in the frontend, it still scans all libraries but also cleans up deletions :)
I also tweaked the library job panel, apparently the two buttons did the exact same thing as the force flag isn't used in the library job:
