Bug CONTEXT_BUTTON_SCAN not working for sources with multiple entries
#1
I started using Helix with Beta 1 and first noticed this issue there. It does not exist in Gotham 13.2.

If I have a source with multiple folder entries, doing a right-click->context menu->Scan for new content (CONTEXT_BUTTON_SCAN) triggers the OnScan call which calls StartVideoScan which in turn calls VideoInfoScanner->Start and the application eventually ends up in VideoInfoScanner.Process. It appears however that the path list being passed into the Process subroutine is empty as the subroutine exits without scanning for new content. For example, the source definition for my Documentaries source is as follows.

<source>
<name>Documentaries</name>
<path pathversion="1">smb://flashbang/h$/TV Shows/Documentaries/</path>
<path pathversion="1">smb://flashbang/i$/Documentaries/</path>
<path pathversion="1">smb://vmware/h$/TV Shows/Documentaries/</path>
<allowsharing>true</allowsharing>
</source>

The debugging log for the event is as follows.

22:43:33 T:2024 DEBUG: ------ Window Init (DialogContextMenu.xml) ------
22:43:33 T:5916 INFO: Python script stopped
22:43:33 T:5916 DEBUG: Thread LanguageInvoker 5916 terminating
22:43:33 T:2024 DEBUG: Keyboard: scancode: 0x48, sym: 0x0111, unicode: 0x0000, modifier: 0x0
22:43:33 T:2024 DEBUG: CApplication::OnKey: up (0xf080) pressed, action is Up
22:43:33 T:2024 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
22:43:33 T:2024 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
22:43:33 T:2024 DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
22:43:34 T:4380 NOTICE: Thread VideoInfoScanner start, auto delete: false
22:43:34 T:2024 DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------
22:43:34 T:4380 NOTICE: VideoInfoScanner: Starting scan ..
22:43:34 T:4380 DEBUG: CAnnouncementManager - Announcement: OnScanStarted from xbmc
22:43:34 T:4380 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanStarted
22:43:34 T:4380 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00
22:43:34 T:4380 DEBUG: CAnnouncementManager - Announcement: OnScanFinished from xbmc
22:43:34 T:4380 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanFinished
22:43:34 T:4380 DEBUG: Thread VideoInfoScanner 4380 terminating
22:43:34 T:2024 DEBUG: CGUIMediaWindow::GetDirectory (sources://video/)
22:43:34 T:2024 DEBUG: ParentPath = [sources://video/]
22:43:34 T:5548 NOTICE: Thread BackgroundLoader start, auto delete: false
22:43:34 T:5548 DEBUG: Thread BackgroundLoader 5548 terminating
22:43:34 T:2024 DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------

However if I run it for my Concerts source, defined as follows,

<source>
<name>Concerts</name>
<path pathversion="1">smb://vmware/f$/Music Videos/Concerts/</path>
<allowsharing>true</allowsharing>
</source>

It scans properly and the debug log is as follows.

23:05:17 T:3292 DEBUG: ------ Window Init (DialogContextMenu.xml) ------
23:05:18 T:3292 DEBUG: Keyboard: scancode: 0x48, sym: 0x0111, unicode: 0x0000, modifier: 0x0
23:05:18 T:3292 DEBUG: CApplication::OnKey: up (0xf080) pressed, action is Up
23:05:20 T:3292 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
23:05:20 T:3292 DEBUG: CApplication::OnKey: return (0xf00d) pressed, action is Select
23:05:21 T:3292 DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
23:05:21 T:4136 NOTICE: Thread VideoInfoScanner start, auto delete: false
23:05:21 T:3292 DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------
23:05:21 T:4136 NOTICE: VideoInfoScanner: Starting scan ..
23:05:21 T:4136 DEBUG: CAnnouncementManager - Announcement: OnScanStarted from xbmc
23:05:21 T:4136 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanStarted
23:05:21 T:4136 DEBUG: XFILE::CWin32SMBDirectory::ConnectAndAuthenticate: Connected to "\\vmware\f$" without username and without password
23:05:21 T:4136 DEBUG: Previous line repeats 17 times.
23:05:21 T:4136 DEBUG: VideoInfoScanner: Skipping dir 'smb://vmware/f$/Music Videos/Concerts/' due to no change
23:05:21 T:4136 DEBUG: XFILE::CWin32SMBDirectory::ConnectAndAuthenticate: Connected to "\\vmware\f$" without username and without password
23:05:21 T:4136 DEBUG: Previous line repeats 5 times.
...... Whole lot of skipping directories and file scans.
23:05:24 T:4136 WARNING: No information found for item 'smb://vmware/f$/Music Videos/Concerts/Nightwish.Showtime.Storytime.2013.BONUS.720p.MBluRay.x264-PublicHD/PublicHD.EXTRAS.Table.Hockey.Tournaments.720p.mkv', it won't be added to the library.
23:05:24 T:4136 DEBUG: VideoInfoScanner: No (new) information was found in dir smb://vmware/f$/Music Videos/Concerts/Nightwish.Showtime.Storytime.2013.BONUS.720p.MBluRay.x264-PublicHD/
23:05:24 T:4136 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:03
23:05:24 T:4136 DEBUG: CAnnouncementManager - Announcement: OnScanFinished from xbmc
23:05:25 T:4136 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanFinished
23:05:25 T:4136 DEBUG: Thread VideoInfoScanner 4136 terminating
23:05:25 T:3292 DEBUG: CGUIMediaWindow::GetDirectory (sources://video/)
23:05:25 T:3292 DEBUG: ParentPath = [sources://video/]
23:05:25 T:1960 NOTICE: Thread BackgroundLoader start, auto delete: false
23:05:25 T:1960 DEBUG: Thread BackgroundLoader 1960 terminating
23:05:25 T:3292 DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------

It seems like the CONTEXT_BUTTON_SCAN process is now expecting to be called on a single folder and is no longer capable of handling a source with multiple paths in it. Since the UI still allows us to create multiple paths in a single source, I regard this as a bug and a fairly annoying one at that. I cannot do a update of just one source after adding a series or movie and have to run the Update Library function instead which hits all the sources and takes a lot longer.
Reply
#2
I believe this is expected behavior. I'll ask.
Reply
#3
Looks like it is a bug. A fix has been submitted and we're just waiting for it to be reviewed: https://github.com/xbmc/xbmc/pull/5950
Reply
#4
Thanks for the update. I'll test when it makes it into the nightlies, not able to get a build environment up for kodi yet.

Judging from the discussions going on in the forums and on the pull request, there seems to have been some confusion between ending multipath support for single series instances and having multiple paths in a source.
Reply

Logout Mark Read Team Forum Stats Members Help
CONTEXT_BUTTON_SCAN not working for sources with multiple entries0