comparison cagou/plugins/plugin_wid_file_sharing.py @ 202:e20796eea873

plugin file sharing: transtype jid.Jid instance to unicode when using bridge, to avoid troubles with pb
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 11:55:28 +0200
parents b80d275e437f
children 9cefc9f8efc9
comparison
equal deleted inserted replaced
201:45a3392b9d26 202:e20796eea873
364 self, 364 self,
365 filepath = parent_path, 365 filepath = parent_path,
366 type_ = C.FILE_TYPE_DIRECTORY) 366 type_ = C.FILE_TYPE_DIRECTORY)
367 self.layout.add_widget(item) 367 self.layout.add_widget(item)
368 self.host.bridge.FISList( 368 self.host.bridge.FISList(
369 self.remote_entity, 369 unicode(self.remote_entity),
370 self.remote_dir, 370 self.remote_dir,
371 {}, 371 {},
372 self.profile, 372 self.profile,
373 callback=self.FISListCb, 373 callback=self.FISListCb,
374 errback=self.FISListEb) 374 errback=self.FISListEb)
462 path, name = os.path.split(item.filepath) 462 path, name = os.path.split(item.filepath)
463 assert name 463 assert name
464 assert self.remote_entity 464 assert self.remote_entity
465 extra = {'path': path} 465 extra = {'path': path}
466 dest_path = files_utils.get_unique_name(os.path.join(G.host.downloads_dir, name)) 466 dest_path = files_utils.get_unique_name(os.path.join(G.host.downloads_dir, name))
467 G.host.bridge.fileJingleRequest(self.remote_entity, 467 G.host.bridge.fileJingleRequest(unicode(self.remote_entity),
468 dest_path, 468 dest_path,
469 name, 469 name,
470 u'', 470 u'',
471 u'', 471 u'',
472 extra, 472 extra,