mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-29 22:23:12 -06:00
Lists should work
This commit is contained in:
parent
880c421f3e
commit
7dfe2cbb5c
@ -1224,10 +1224,9 @@ class Controller(object):
|
|||||||
buffer.add_new_item(data)
|
buffer.add_new_item(data)
|
||||||
|
|
||||||
def manage_item_in_list(self, data, user, where):
|
def manage_item_in_list(self, data, user, where):
|
||||||
print "I'm activated!"
|
|
||||||
buffer = self.search_buffer("%s" % (where,), user)
|
buffer = self.search_buffer("%s" % (where,), user)
|
||||||
if buffer == None: return
|
if buffer == None: return
|
||||||
play_sound = "tweet_timeline.ogg"
|
play_sound = "list_tweet.ogg"
|
||||||
if "%s" % (where,) not in buffer.session.settings["other_buffers"]["muted_buffers"]:
|
if "%s" % (where,) not in buffer.session.settings["other_buffers"]["muted_buffers"]:
|
||||||
self.notify(buffer.session, play_sound=play_sound)
|
self.notify(buffer.session, play_sound=play_sound)
|
||||||
output.speak(_(u"One tweet from %s") % (data["user"]["name"]))
|
output.speak(_(u"One tweet from %s") % (data["user"]["name"]))
|
||||||
|
@ -42,23 +42,20 @@ class timelinesStreamer(TwythonStreamer):
|
|||||||
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)
|
||||||
# return
|
|
||||||
for i in self.session.lists:
|
for i in self.session.lists:
|
||||||
try:
|
try:
|
||||||
i.users.index(data["user"]["id"])
|
i.users.index(data["user"]["id"])
|
||||||
# print "Index in the list for the specified user: %d" % (i.users.index(data["user"]["id"]),)
|
|
||||||
usr = data["in_reply_to_user_id"]
|
usr = data["in_reply_to_user_id"]
|
||||||
if (usr != None or usr in self.friends) or data.has_key("retweeted_status"):
|
if (usr != None or usr in self.friends) or data.has_key("retweeted_status"):
|
||||||
data = self.session.check_quoted_status(data)
|
data = self.session.check_quoted_status(data)
|
||||||
# print data
|
|
||||||
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,)].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)
|
||||||
elif usr == None:
|
elif usr == None:
|
||||||
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,)].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