2017-10-14, 21:10
I haven't started digging around in the code for this yet but is there a fundamental reason why Clean Library can't be performed as a background task with a background progress dialog?
(2017-10-17, 18:12)DaveBlake Wrote: Which library music or video?
AFAIK the video library is cleaned as a background task (although it is possible that the UI for the progress dialog is still on the same thread and so gets locked). See https://github.com/xbmc/xbmc/pull/6406 that implemented a job queue and added CVideoLibraryCleaningJob that does it. Start digging here https://github.com/xbmc/xbmc/commits/mas...ingJob.cpp if you like.
Music library cleaning in Krypton is done on the main thread (and locks the UI). In a PR (related to music export and local artist art imporovements) https://github.com/xbmc/xbmc/pull/12891 I have started the implementation of a music job queue similar to the video job queue. My plan once that is merged is to move other music library tasks, including clean library, onto using it and away from the main thread.
So work is in hand, but if you want to contribute then please do.
(2017-10-25, 12:27)Martijn Wrote: If video clean is really slow then it means you have a lot of plugin links in the database as whatever you watched with a plugin is also store. The clean will walk a over all of these each time
(2019-07-04, 08:17)BigRedBrent Wrote: This is one of the most annoying things not being able to have this performed in the background.
(2019-07-04, 12:31)Klojum Wrote:(2019-07-04, 08:17)BigRedBrent Wrote: This is one of the most annoying things not being able to have this performed in the background.
I do a clean library once every 3 months or so, 4 times a year. It's not that annoying: you start the process and you go do something else.
How often do you really need to clean your library?
(2019-07-07, 06:24)Klojum Wrote: The keyword was actually "really" in my question. Removing a couple of items each time from a library does not warrant a cleaning of the whole video database that very same moment. There is no technical demand for that. The database can work just as fine after a whole year, it's what databases do.
Having it done in the background could also present a problem, as currently the Kodi skin is not refreshed during the process of database entries getting deleted/cleaned.
(2019-07-08, 13:11)BigRedBrent Wrote: It's just annoying having searchable entries that no longer have files associated with them when browsing the database.I'm not disagreeing with you, but the fact is that we have some XBMC souvenirs in the current Kodi code.