#33: Initial interact() method. Very rough.

This commit is contained in:
Bill Dengler 2015-05-12 09:47:41 -04:00
parent c1ce8cb8e5
commit 0aaec95ac4

View File

@ -437,6 +437,18 @@ class baseBufferController(bufferController):
else:
return self.url_browser()
def interact(self):
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
#debugging (remove when issue is closed).
output.speak("Interact method invoked",True)
tweet = self.get_tweet()
urls = utils.find_urls(tweet)
#handle audio-only (no weblinks) tweets.
if len(urls) == 1 and utils.is_audio(tweet) and self.session.settings["general"]["autohandle_audio"]:
return self.audio()
else:
return self.url()
def url_browser(self):
tweet = self.get_tweet()
urls = utils.find_urls(tweet)