mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Attempt to fix merge conflict.
This commit is contained in:
commit
74f0e8ba50
@ -12,7 +12,6 @@ use_invisible_keyboard_shorcuts = boolean(default=True)
|
||||
play_ready_sound = boolean(default=True)
|
||||
speak_ready_msg = boolean(default=True)
|
||||
log_level = string(default="error")
|
||||
use_modern_audio_algo = boolean(default=True)
|
||||
|
||||
[keymap]
|
||||
up = string(default="control+win+up")
|
||||
|
@ -114,7 +114,6 @@ class Session(object):
|
||||
self.settings = config_utils.load_config(paths.config_path(file_), paths.app_path("Conf.defaults"))
|
||||
self.init_sound()
|
||||
self.deshelve()
|
||||
self.fix_audio_tags()
|
||||
# except:
|
||||
# log.exception("The session configuration has failed.")
|
||||
# self.settings = None
|
||||
@ -410,17 +409,3 @@ class Session(object):
|
||||
log.exception("Exception while deshelving" + shelfname)
|
||||
os.remove(shelfname)
|
||||
|
||||
def fix_audio_tags(self,force=False):
|
||||
"Repair audio tags."
|
||||
for key,value in self.db.items():
|
||||
if type(value) == list:
|
||||
for t in value:
|
||||
utils.is_audio(t,force=force)
|
||||
|
||||
def clean_is_audio_memmos(self):
|
||||
"Clean out memmos for is_audio"
|
||||
for key,value in self.db.items():
|
||||
if type(value) == list:
|
||||
for i in value:
|
||||
if 'is_audio' in i:
|
||||
del i['is_audio']
|
@ -45,6 +45,7 @@ def find_next_reply(id, listItem):
|
||||
return None
|
||||
|
||||
def is_audio(tweet,force=False):
|
||||
<<<<<<< HEAD
|
||||
start=time.time()
|
||||
if force == False and 'is_audio' in tweet:
|
||||
return tweet['is_audio']
|
||||
@ -73,6 +74,10 @@ def is_audio(tweet,force=False):
|
||||
end=time.time()
|
||||
print "Codeofdusk algo took",end-start,"seconds."
|
||||
tweet['is_audio']=False
|
||||
if len(tweet["entities"]["hashtags"]) > 0:
|
||||
for i in tweet["entities"]["hashtags"]:
|
||||
if i["text"] == "audio":
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_geocoded(tweet):
|
||||
@ -138,6 +143,7 @@ def is_allowed(tweet, clients):
|
||||
allowed = False
|
||||
log.exception("Tuit not allowed: %s" % (tweet["text"],))
|
||||
return allowed
|
||||
<<<<<<< HEAD
|
||||
|
||||
def url_is_audio(u):
|
||||
sound.URLPlayer.is_playable(u)
|
||||
|
Loading…
Reference in New Issue
Block a user