Solved Videoscanner skipping sftp/ssh source folders
#1
Hi all,

This is a description of the changes included in my pull request ( https://github.com/xbmc/xbmc/pull/2058 ). It fixes the following ticket (http://trac.xbmc.org/ticket/13784).

The original problem was that a recent change to the video scanner ( https://github.com/xbmc/xbmc/commit/5ca0...8547a7e659 ) added a requirement that each protocol class handling access to a directory which can be used as a video source must implement the Exists() method. For the SFTP protocol, there was no overridden implementation, just one which returns false by default. The meant that the videoscanner was unable to scan video sources using the SFTP protocol, and they were just skipped.

The patch implements the missing CSFTPDirectory::Exists() method, using a modified version of the CSFTPSession::Exists(), which provided the ability to check that an SFTP file exists. In doing so, I've added that the path being checked for existence with CSFTPFile::Exists() must be specifically referring to a file, and the path used with CSFTPDirectory::Exists() must refer to a directory. This is in keeping with other filesystem classes (e.g. CNFSDirectory) and seems to make sense since there is already a separation between classes representing directories and files (i.e. Exists() is a question as much about the type as it is about item existence).

This has been tested under Linux (Ubuntu 12.04) and Windows Vista.
Reply

Logout Mark Read Team Forum Stats Members Help
Videoscanner skipping sftp/ssh source folders0