I have a couple of Windows boxes I use as XBMC media center clients. Basically, they’re configured as appliances; I fire ’em up via Wake-on-LAN, they auto login and launch XBMC. Simple enough. The MySQL back-end and Samba shares live on an OpenBSD host on my LAN. I set up library sharing per the guide on XBMC’s wiki, and it worked. Mostly.
The “update library on startup” feature never worked at all, and I’d occasionally get a “File is no longer available” error when I tried to play a file. Running an “Update library” would get things working again. A minor irritation, and since I always ran into it just as I was getting ready to watch a movie, I never really felt like putting on my IT Guy hat and diving into a debugging session.
Cumulative annoyance finally got the better of me, so I turned on debug logging and saw a bunch of entries like:
WARNING: VIDEO::CVideoInfoScanner::Process directory 'smb://user:firstname.lastname@example.org/media/Videos/Movies/' does not exist - skipping scan and clean.
Fixed the issue by going into saved credentials on my PC and adding the SMB password for the shared folder. Start -> run -> netplwiz -> advanced -> manage passwords -> windows credentials -> add a windows credential -> network address: \NAMEOFSHARE
Sure enough, that works. It’s odd, though. XBMC expects to handle SMB shares on its own, at the application level, rather than working on a mapped drive. And it stores the credentials for the shares in its own passwords.xml config file. So why does storing a credential in netplwiz fix this problem? Dunno. And I’m not really inclined to go any further down that rabbit hole today.