mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixed bug that makes list to crash the client
This commit is contained in:
parent
6baf417d35
commit
3684ec2783
@ -713,12 +713,12 @@ class listBufferController(baseBufferController):
|
||||
super(listBufferController, self).start_stream(mandatory)
|
||||
|
||||
def get_user_ids(self):
|
||||
self.users = []
|
||||
next_cursor = -1
|
||||
while(next_cursor):
|
||||
users = self.session.twitter.twitter.get_list_members(list_id=self.list_id, cursor=next_cursor, include_entities=False, skip_status=True)
|
||||
for i in users['users']:
|
||||
self.users.append(i["id"])
|
||||
if i["id"] not in self.users:
|
||||
self.users.append(i["id"])
|
||||
next_cursor = users["next_cursor"]
|
||||
|
||||
def remove_buffer(self):
|
||||
|
@ -27,12 +27,12 @@ class timelinesStreamer(TwythonStreamer):
|
||||
if utils.find_item(data["id"], self.session.db["%s-timeline" % (i,)]) != None:
|
||||
log.error("duplicated tweet. Ignoring it...")
|
||||
return
|
||||
try:
|
||||
data_ = self.session.check_quoted_status(data)
|
||||
data_ = self.session.check_long_tweet(data_)
|
||||
data = data_
|
||||
except ValueError:
|
||||
pass
|
||||
# try:
|
||||
data_ = self.session.check_quoted_status(data)
|
||||
data_ = self.session.check_long_tweet(data_)
|
||||
data = data_
|
||||
# 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)
|
||||
@ -53,7 +53,7 @@ class timelinesStreamer(TwythonStreamer):
|
||||
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 NameError:
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def set_friends(self, friends):
|
||||
|
Loading…
Reference in New Issue
Block a user