mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
#33: redefine methods.
This commit is contained in:
parent
0aaec95ac4
commit
be787dc728
@ -427,16 +427,6 @@ class baseBufferController(bufferController):
|
|||||||
if hasattr(urls_list, "destroy"): urls_list.destroy()
|
if hasattr(urls_list, "destroy"): urls_list.destroy()
|
||||||
|
|
||||||
@_tweets_exist
|
@_tweets_exist
|
||||||
def url(self):
|
|
||||||
"Select the best action for a URL."
|
|
||||||
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_browser()
|
|
||||||
|
|
||||||
def interact(self):
|
def interact(self):
|
||||||
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
||||||
#debugging (remove when issue is closed).
|
#debugging (remove when issue is closed).
|
||||||
@ -449,7 +439,7 @@ class baseBufferController(bufferController):
|
|||||||
else:
|
else:
|
||||||
return self.url()
|
return self.url()
|
||||||
|
|
||||||
def url_browser(self):
|
def url(self):
|
||||||
tweet = self.get_tweet()
|
tweet = self.get_tweet()
|
||||||
urls = utils.find_urls(tweet)
|
urls = utils.find_urls(tweet)
|
||||||
if len(urls) == 1:
|
if len(urls) == 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user