Req Clean Library in the background
#1
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?
Reply
#2
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.
Reply
#3
(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.

Thanks. That sounds great.

It's the Video library clean that I need to be in the background. I come downstairs some mornings and the kids are sitting there waiting for ages to watch their cartoons because the Video Library Clean dialog is slowly progressing in the foreground.

I don't think I'll have time to help out in the core code unless you have other commitments.
Reply
#4
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
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
(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

In my case it is because it is on the kids rpi version 1 and there are a lot of local children's movies and series on an old Popcorn Time NMT box.
Reply
#6
This is one of the most annoying things not being able to have this performed in the background. There are addons that try to regularly clean the library, and not being able to have them do that in the background is incredibly annoying.
Reply
#7
(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?
Reply
#8
(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? 

Since I often remove items from the library, pretty much every time kodi is opened. Would be nice if the process was done in the background...
Reply
#9
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.
Reply
#10
(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.

It's just annoying having searchable entries that no longer have files associated with them when browsing the database. Would be nice if a simpler remove listing ability was available that would be automatically processed in the background.
Reply
#11
(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. Smile
If I had known C++ and/or Python, these type of 'slips' would have been fixed already.
Reply

Logout Mark Read Team Forum Stats Members Help
Clean Library in the background0