Library Update adds items from non-existent SMB source
#1
System: Frodo RC2 on Win7 Pro 64 Bit connecting to unRAID NAS via 100 Mbps LAN

I've just had a problem with my library updates adding items from a completely removed source and it looks like I've sorted it out but I thought I'd just post my findings here in case anybody else runs into this.

The problem: When I was doing a library update, I was getting double copies of all my TV Episodes appearing in my library. When I investigated I discovered that it was because one copy was being referenced via an active NFS source and a second copy was being found via an SMB path that had previously been setup as a source for the SAME TV Series root folder as the currently active NFS source, but had then been removed.

How it happened: I think I know what lead to all this confusion. A few nights ago the NFS shares on my unRAID NAS stopped responding and in the process of troubleshooting the problem I had done an "Edit Source" on the XBMC Source pointing to my root TV Series folder and removed the NFS path and added an equivalent SMB path instead. But then I very quickly realised that you cannot just do that in XBMC, of course, because files are added to the database with the path etc. and changing the Source path from NFS to SMB like that does NOT remap the paths for all existing library items.

Long story short, I eventually discovered that it was actually my NAS that needed a reboot to sort out whatever was malfunctioning with the NFS shares and then everything came back online. At that point, having set the XBMC source back to the way it was initially, everything worked again, and I thought the issue was resolved.

But then this morning I noticed that a library update was adding a 2nd copy of every episode to my library, 1 for NFS and 1 for SMB. I tried adding an SMB Source explicitly and then removing it to get XBMC to remove all the SMB entries for me, and that worked ... until the next library update, and then it would add them all again! I cleaned the library about 10 times, I tried all manner of things, no luck.

It would just keep adding the episodes again via this mystical SMB source that no longer existed.

The Solution: I did some Googling and some more investigation and ended up in SqlLiteSpy hacking the MyVideos DB (most recent version) directly.

In there I discovered that there were entries in the "path" and "files" tables in the database referencing the SMB source path.

So I removed them as follows:

delete from "files" where idPath in (SELECT idPath FROM "path" where strPath like "%smb%");

delete from "path" where strPath like "%smb%";



Obviously you need to be careful if you are going to work against the DB directly like that and please backup your databases before you do.

That solved my problem completely.


Reply

Logout Mark Read Team Forum Stats Members Help
Library Update adds items from non-existent SMB source0