Update internal struct of resource, hash list and get diff

        (Warning: Resource names have to be unique!!)

        :param reset: Should resources be rebuild from scratch (default: False)
        :type reset: bool
        :return: List of resources and hashes that changed
        :rtype: list[(unicode, unicode)]

def resource_update_list(self, reset=False):
        """
        Update internal struct of resource, hash list and get diff

        (Warning: Resource names have to be unique!!)

        :param reset: Should resources be rebuild from scratch (default: False)
        :type reset: bool
        :return: List of resources and hashes that changed
        :rtype: list[(unicode, unicode)]
        """
        if not self._resource_path:
            raise PluginException("No resource path set")
        if not os.path.isdir(self._resource_path):
            raise PluginException(
                u"Resource path directory '{}' not found".format(
                    self._resource_path
                )
            )
        res = []
        with self._resource_lock:
            if reset:
                self._resources = {}
            old = dict(self._resources)
            for dirname, dirnames, filenames in os.walk(self._resource_path):
                for file_name in filenames:
                    file_ext = os.path.splitext(file_name)[1].lower()[1:]
                    if file_ext not in self._resource_file_types:
                        self.debug(u"Skipping '{}'".format(file_name))
                        continue
                    file_path = os.path.join(dirname, file_name)
                    try:
                        file_hash = get_file_hash(file_path)
                    except:
                        self.exception(
                            u"Failed to hash '{}'".format(file_path)
                        )
                        continue
                    self._resources[file_name] = {
                        'name': file_name,
                        'path': file_path,
                        'hash': file_hash,
                        'checked': datetime.datetime.utcnow()
                    }

            # generate diff
            for key in self._resources:
                resource = self._resources[key]
                if key not in old or old[key]['hash'] != resource['hash']:
                    # new file or hash changed
                    res.append((key, resource['hash']))
        return res