def METHOD_NAME(self, hash, priority, *files):
    params = [('action', 'setprio'), ('hash', hash), ('p', str(priority))]
    for file_index in files:
        params.append(('f', str(file_index)))
    return self._action(params)