'Called when a directory is being scanned (out of possibly many)
@param description {unicode} A string suitable for showing the user
regarding the progress
@param dir {unicode} The directory currently being scanned
@param current {int} The current progress
@param total {int} The total number of directories to scan in this
request'

def onScanDirectory(self, description, dir_path, current=None, total=None):

    self.debug('scan    directory:    %s    (%s    %s/%s)', description, dir_path, current, total)
    assert dir_path, 'onScanDirectory    got    no    directory'
    if dir_path:
        self._completed_dirs.add(dir_path)
    self.send(type='scan-progress', message=description, completed=len(self._completed_dirs), total=len(self._dirs))
