Made algo option application-wide, setting should actually work now.

This commit is contained in:
Bill Dengler
2015-05-12 19:52:47 -04:00
parent ee1f95ea3b
commit ab08d21d95
5 changed files with 14 additions and 13 deletions

View File

@@ -50,11 +50,11 @@ def is_audio(tweet,force=False):
if i["text"] == "audio":
tweet['is_audio']=True
return True
#implement conditional.
for u in find_urls(tweet):
if url_is_audio(u):
tweet['is_audio']=True
return True
if config.app['app-settings']['use_modern_audio_algo']:
for u in find_urls(tweet):
if url_is_audio(u):
tweet['is_audio']=True
return True
tweet['is_audio']=False
return False