Long tweets are displayed properly in lists

This commit is contained in:
Manuel Cortez 2016-08-04 17:40:07 -05:00
parent 4056c73052
commit 41b10e3a84
2 changed files with 10 additions and 6 deletions

View File

@ -585,10 +585,10 @@ class baseBufferController(bufferController):
url=urls_list.get_string()
if hasattr(urls_list, "destroy"): urls_list.destroy()
if url != '':
try:
# try:
sound.URLPlayer.play(url, self.session.settings["sound"]["volume"])
except:
log.error("Exception while executing audio method.")
# except:
# log.error("Exception while executing audio method.")
# @_tweets_exist
def url(self, url='', announce=True, *args, **kwargs):

View File

@ -38,25 +38,29 @@ class timelinesStreamer(TwythonStreamer):
data_ = self.session.check_quoted_status(data)
data_ = self.session.check_long_tweet(data_)
data = data_
except AttributeError:
except ValueError:
pass
if self.session.settings["general"]["reverse_timelines"] == False: self.session.db["%s-timeline" % (i,)].append(data)
else: self.session.db["%s-timeline" % (i,)].insert(0, data)
pub.sendMessage("item-in-timeline", data= data, user= self.session.db["user_name"], who= i)
return
for i in self.session.lists:
try:
i.users.index(data["user"]["id"])
usr = data["in_reply_to_user_id"]
if (usr != None and usr in self.friends) or data.has_key("retweeted_status"):
data = self.session.check_quoted_status(data)
data = self.session.check_long_tweet(data)
if self.session.settings["general"]["reverse_timelines"] == False: self.session.db["%s" % (i.name,)].append(data)
else: self.session.db["%s" % (i.name,)].insert(0, data)
pub.sendMessage("item-in-list", data=data, user=self.session.db["user_name"], where=i.name)
elif usr == None:
data = self.session.check_quoted_status(data)
data = self.session.check_long_tweet(data)
if self.session.settings["general"]["reverse_timelines"] == False: self.session.db["%s" % (i.name,)].append(data)
else: self.session.db["%s" % (i.name,)].insert(0, data)
pub.sendMessage("item-in-list", data=data, user=self.session.db["user_name"], where=i.name)
except ValueError:
except NameError:
pass
def set_friends(self, friends):