From e3ea50ffbf3567247e2779d61eb1293e967be1d5 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 28 Apr 2016 19:43:46 +0200 Subject: Fix missing setClipboard for multipastes Signed-off-by: Florian Pritz --- fb.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fb.py b/fb.py index a891572..c1e4c5e 100755 --- a/fb.py +++ b/fb.py @@ -561,12 +561,14 @@ class FBClient: resp = self.curlw.upload_files(upload_files) if self.args.multipaste or len(resp) > 1: - self.multipaste([f.id for f in resp]) + resp = self.multipaste([f.id for f in resp]) + urls = [resp["url"]] else: urls = [f.url for f in resp] - for url in urls: - print(url) - self.setClipboard(' '.join(urls)) + + for url in urls: + print(url) + self.setClipboard(' '.join(urls)) def setClipboard(self, content): try: @@ -585,7 +587,7 @@ class FBClient: data.append({"ids["+id+"]": id}) resp = self.curlw.send_post("/file/create_multipaste", data) - print(resp["url"]) + return resp def upload(self): if self.args.tar: -- cgit v1.2.3-24-g4f1b