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