Page 1 of 2

tvOS - (libdsm) Library Scan Skips Folders

Posted: 04 Apr 2016, 23:44
by Nagsterus
Hello,
I noticed that since enabling libdsm, the library scans don't seem to pick up certain new files. If I disable libdsm, the scan picks them up. Also, with libdsm enabled, the files play perfectly fine once they make it into the library. In my Windows environment, I had to enable libdsm in order for the subtitle downloads to work; otherwise, I kept getting the "failed to download subtitles" error.

Here's an excerpt of the log. All folders exist and the files within them are accessible via the MrMC file and library browsers even with libdsm enabled. The issue is quite odd. Thanks for your help!

Code: Select all

19:00:34 T:6144569344   DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------
19:00:34 T:6141128704  NOTICE: VideoInfoScanner: Starting scan ..
19:00:34 T:6141128704   DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanStarted
19:00:34 T:6141128704   DEBUG: CDSMSession: Creating new session on host 'Server1' with session 0x153e34830
19:00:34 T:6141128704   DEBUG: CDSMSession: Logged in as regular user
19:00:34 T:6141128704 WARNING: Process directory 'smb://Server1/Subtitles/' does not exist - skipping scan.
19:00:34 T:6141128704   DEBUG: CDSMSession: Creating new session on host 'Server1' with session 0x15394ccb0
19:00:34 T:6141128704   DEBUG: CDSMSession: Logged in as regular user
19:00:34 T:6141128704 WARNING: Process directory 'smb://Server1/Videos/TV Shows/' does not exist - skipping scan.
19:00:34 T:6141128704   DEBUG: found key /userdata/addon_data/metadata.tvdb.com/settings.xml
19:00:34 T:6141128704   DEBUG: Previous line repeats 1 times.
19:00:34 T:6141128704   DEBUG: VideoInfoScanner: Skipping dir 'smb://Server1/Videos/TV Shows/Show1/' due to no change
19:00:34 T:6141128704   DEBUG: found key /userdata/addon_data/metadata.tvdb.com/settings.xml
19:00:34 T:6141128704   DEBUG: Previous line repeats 1 times.
19:00:34 T:6141128704   DEBUG: VideoInfoScanner: Skipping dir 'smb://Server1/Videos/TV Shows/Show2/' due to no change
19:00:35 T:6141128704 WARNING: Process directory 'smb://Server2/Videos/Movies/' does not exist - skipping scan.
19:00:35 T:6141128704   DEBUG: found key /userdata/addon_data/metadata.universal/settings.xml
19:00:35 T:6141128704   DEBUG: VideoInfoScanner: Skipping dir 'smb://Server2/Videos/Movies/MovieBundle1/' due to no change (fasthash)
19:00:35 T:6141128704   DEBUG: found key /userdata/addon_data/metadata.universal/settings.xml
19:00:35 T:6141128704   DEBUG: VideoInfoScanner: Skipping dir 'smb://Server2/Videos/Movies/MovieBundle2/' due to no change (fasthash)
19:00:35 T:6141128704   DEBUG: found key /userdata/addon_data/metadata.universal/settings.xml
19:00:35 T:6141128704   DEBUG: VideoInfoScanner: Skipping dir 'smb://Server2/Videos/Movies/MovieBundle3/' due to no change (fasthash)
19:00:35 T:6141128704  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:01
19:00:35 T:6141128704   DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanFinished
19:00:35 T:6144569344   DEBUG: CGUIMediaWindow::GetDirectory (videodb://movies/titles/)
19:00:35 T:6144569344   DEBUG:   ParentPath = [videodb://movies/titles/]
19:00:35 T:6141128704   DEBUG: RunQuery took 139 ms for 673 items query: select * from movie_view
19:00:35 T:6144569344   DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 01:17
by davilla
are you saying 'smb://Server1/Videos/TV Shows/' does exist but libdsm is not seeing it ?

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 02:11
by Nagsterus
Yes, but it does see it if I browse to it with Videos>Files or the share browser; it just doesn't see it during the library scan for new files. So the files in that folder are never added to the library unless I disable libdsm and scan again.

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 03:06
by davilla
do you have any other directories with a space in the name that do or do not scan ?

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 13:43
by Nagsterus
'smb://Server2/Videos/Movies/' doesn't scan, but directories under it with spaces in the names do scan (ex: 'smb://Server2/Videos/Movies/Some Movie Bundle/'). Also, directories under 'smb://Server1/Videos/TV Shows/' with spaces in the names also scan fine (ex: 'smb://Server1/Videos/TV Shows/Some TV Show/').

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 15:20
by davilla
very odd, any difference in how the share point is setup or the permissions on the server side ?

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 15:36
by Nagsterus
Not really; the shares are all set up the same. They are password protected Windows shares. When I was having the issue saving subtitles, I described how they are set up here: http://mrmc.tv/forum/viewtopic.php?f=4&t=142#p1159

Enabling libdsm fixed the subtitle saving issue I was having, but it apparently broke the library scan for me.

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 15:40
by davilla
in the next testflight after the one that is currently going up, I'll add more logging under libdsm and maybe that will show what is does not like about the non-scanning directories.

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 05 Apr 2016, 16:06
by Nagsterus
Thanks! I appreciate it.

Re: tvOS - (libdsm) Library Scan Skips Folders

Posted: 07 Apr 2016, 13:51
by davilla
Try this for a test, add a folder to the server, force quit MrMC. Then so the lib scan after MrMC is lauched again.

MrMC does some caching of the smb session, similar to what I thought libsmbclient does. But it could be that libdsm takes a snapshot of the share point in time and adding a dir while the session is active does not get seen. Should be able to reproduce here.