Kodi Community Forum

Full Version: Music library gets removed when NAS goes offline
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I have my NAS shut down once a week on Sunday night. It comes back online later on Monday. My problem is that XBMC removes my entire music library at some point when the NAS is offline. All of my other libraries are intact. Any idea why this is happening? I checked and "clean library" is off in settings.
If you "update library" in the music during that period, then it may do that regardless of whether "clean library" is available or not, but really we can't tell until you get a log of it occurring.
jmarshall Wrote:If you "update library" in the music during that period, then it may do that regardless of whether "clean library" is available or not, but really we can't tell until you get a log of it occurring.

Thank you for the reply. I have an add-on that automatically updates my library every few hours. So is this the intended behavior of XBMC? If so, why doesn't this library removal occur to my movies and tv shows? Any way to keep this from happening?
The video library is "dumb" in that it ignores anything that is no longer there - basically, given a changed folder it'll just go through it and add in anything new that it has found, ignoring anything that is already there, regardless of whether it has changed or not.

The music library is "smart" in that if anything changes it will rescan that folder and update it, so if anything has changed it will pick it up, and if anything has been removed it'll remove it.

The problem is it thinks the folder has gone, even though what has actually happened is the NAS is no longer reachable. So in this case, the "smart" behaviour is in fact "dumb".

Cheers,
Jonathan
Thanks again. It would be great if the music library could tell the difference between a folder being removed and the source not being available.

I guess my only option now is to not auto-update my music library which makes XBMC not quite as user friendly....
That would also explain my problem.

I store my music on my NAS.

I was finding that I was losing music for Artists from A-D quite regularly. E-Z were fine. If I ran a manual library update it would re-populate the library as it should be.

It dawned on me last night that it was probably down to the time taken by my NAS to spin the disks up after being woken by XBMC. I had it configured to update the library on startup, which it was doing every time the HTPC wakes from sleep.

I've disabled all auto-updates and I'll do it manually from now on. Can't help feeling that the Video update method is more robust, it would just need a periodic 'clean' after any big changes.
jmarshall Wrote:...So in this case, the "smart" behaviour is in fact "dumb"...
Jonathan,
Any chance of having the <cleanonupdate> preference switch available under <musiclibrary> in advancedsettings?

Cheers, Mike
I would suggest exposing an option in settings to autoremove videos/music that are no longer available. Option would be visible if auto update library on startup is enabled. This way one can choose if DB would act as smart or dumb, according to his preferences.