diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index e7475c2d..fa955254 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -143,9 +143,16 @@ class bufferController(object): if tweet.image == None: call_threaded(self.session.api_call, call_name="update_status", status=text) else: - call_threaded(self.session.api_call, call_name="update_status_with_media", status=text, media=tweet.image) + call_threaded(self.post_with_media, text=text, image=tweet.image) if hasattr(tweet.message, "destroy"): tweet.message.destroy() + def post_with_media(self, text="", image=None, description=None): + if image != None: + img = self.session.twitter.twitter.upload_media(media=image) +# if description != None: +# self.session.twitter.twitter.set_description(media_id=img["media_id"], alt_text=description) + self.session.api_call(call_name="update_status", status=text, media_ids=img["media_id"]) + def save_positions(self): try: self.session.db[self.name+"_pos"]=self.buffer.list.get_selected()