Added more hooks, we now call the proper method to cache audio test results, added force flag to skip memmo checks and overwrite invalid memmos (useful when switching algos).

This commit is contained in:
Bill Dengler
2015-05-12 19:11:24 -04:00
parent 9b4fdc8966
commit 8ce5c258d3
3 changed files with 11 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ class streamer(TwythonStreamer):
self.session.db[place].append(data)
else:
self.session.db[place].insert(0, data)
utils.is_audio(data)
def block_user(self, data):
id = data["target"]["id"]
if id in self.friends:

View File

@@ -42,8 +42,8 @@ def find_next_reply(id, listItem):
if listItem[i]["in_reply_to_status_id_str"] == str(id): return i
return None
def is_audio(tweet):
if 'is_audio' in tweet:
def is_audio(tweet,force=False):
if force == False and 'is_audio' in tweet:
return tweet['is_audio']
if len(tweet["entities"]["hashtags"]) > 0:
for i in tweet["entities"]["hashtags"]: