Library gets automatically cleaned every day at 04:30

Every day, early in the morning around 04:30 my entire library gets deleted

2020-09-09 00:27:26.737 T:4072325120  NOTICE: Activating standby mode
2020-09-09 00:27:26.746 T:4072325120  NOTICE: CApplication::ToggleStandby -- checking for existence of /home/osmc/.kodi/userdata/standby.py
2020-09-09 04:24:46.111 T:3031429856  NOTICE: CleanDatabase: Starting videodatabase cleanup ..
2020-09-09 04:24:46.428 T:3031429856  NOTICE: CleanDatabase: Cleaning videodatabase done. Operation took 00:00
2020-09-09 04:24:49.587 T:3031429856  NOTICE: VideoInfoScanner: Starting scan ..
2020-09-09 04:24:49.623 T:3031429856  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00
2020-09-09 04:24:58.479 T:3475935968  NOTICE: JELLYFIN.monitor -> INFO::jellyfin_kodi/monitor.py:43 -->[ kodi scan/video ]
2020-09-09 04:25:00.707 T:3475935968  NOTICE: JELLYFIN.monitor -> INFO::jellyfin_kodi/monitor.py:46 --<[

I already tried disabling “Settings > Media > Library > Update library on startup”, but it doesn’t seem to work. Every morning everything gets deleted, except my TV series, they remain but are empty (no seasons or episodes anymore)
Could this be some osmc setting? Is this perhaps related to the jellyfin_kodi plugin?

You could probably just disable the jellyfin add-on to find out but i’m not so sure you have nailed the source of the missing library items. I’m pretty sure it would take more than zero seconds to clean a library that is not empty already. Have you tried manually running the library clean to see if Kodi removes everything.

I rather think that when it’s scanning the drives, it does not find the drives (the media resides in), and as you have probably configured “delete missing media from library”, as it finds nothing, it deletes what is not found.

If this was the case Kodi should have popped up a confirmation dialog. I don’t remember when they added that to take care of the missing library complaints, but I think it has been quite a while now.

It had been empty for several days already, I don’t restore the library daily, I just picked the latest log entry.
I’ll restore the library once again and check tomorrow morning if it took longer.

I can’t seem to find a “delete missing media from library” or something like that. Where might I find this setting?

I have had this to, my conclusion was NEVER use the clean library function in kodi when using the Jellyfin library!!!

Kodi itself does not have GUI settings option for the “clean on update” feature, just the option to manually trigger it. Normally if this is enabled it has been done with an advancedsettings file by the user, although I would guess there are probably add-ons that allow for this to be set as well.

I bet that depends on the used UI/Theme. I definitely remember it to be there, as that’s where I had set it (long time ago, Kodi 17 probably with Confluence theme).