Cache com saved in data directory. Translation service restored

This commit is contained in:
Manuel Cortez 2015-10-31 20:57:21 -06:00
parent af41dcfc4e
commit 6a4a3cc94e
5 changed files with 8 additions and 9 deletions

View File

@ -5,7 +5,7 @@ if snapshot == False:
version = "0.80"
update_url = 'http://twblue.es/updates/twblue_ngen.json'
else:
version = "10.93"
version = "10.94"
update_url = 'http://twblue.es/updates/snapshots_ngen.json'
author = u"Manuel Cortéz"
authorEmail = "manuel@manuelcortez.net"

View File

@ -531,7 +531,7 @@ class baseBufferController(bufferController):
# @_tweets_exist
def audio(self, url='', *args, **kwargs):
if hasattr(sound.URLPlayer,'stream'):
if hasattr(sound.URLPlayer,'stream') and sound.URLPlayer.stream.is_playing == True:
return sound.URLPlayer.stop_audio(delete=True)
tweet = self.get_tweet()
if tweet == None: return

View File

@ -1249,7 +1249,11 @@ class Controller(object):
log.error(" Restarting %s session streams. It will be destroyed" % (session,))
s = session_.sessions[session]
try:
if hasattr(s, "main_stream"): del s.main_stream
if hasattr(s, "main_stream"):
self.main_stream.disconnect()
log.error("main stream disconnected")
del s.main_stream
self.timelinesStream.disconnect()
del s.timelinesStream
s.counter = 0
s.reconnection_function_active = False

View File

@ -1,7 +1,7 @@
from pywintypes import com_error
import win32com
import paths
win32com.__gen_path__=paths.config_path(u"com_cache")
win32com.__gen_path__=paths.data_path(u"com_cache")
import sys
import os
sys.path.append(os.path.join(win32com.__gen_path__, "."))

View File

@ -78,7 +78,6 @@ class tweet(textLimited):
self.shortenButton.Disable()
self.unshortenButton.Disable()
self.translateButton = wx.Button(self.panel, -1, _(u"Translate..."), size=wx.DefaultSize)
self.translateButton.Enable(False)
self.autocompletionButton = wx.Button(self.panel, -1, _(u"&Autocomplete users"))
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
self.okButton.SetDefault()
@ -139,7 +138,6 @@ class retweet(tweet):
self.shortenButton.Disable()
self.unshortenButton.Disable()
self.translateButton = wx.Button(self.panel, -1, _(u"Translate message"), size=wx.DefaultSize)
self.translateButton.Enable(False)
self.autocompletionButton = wx.Button(self.panel, -1, _(u"&Autocomplete users"))
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
self.okButton.SetDefault()
@ -201,7 +199,6 @@ class dm(textLimited):
self.shortenButton.Disable()
self.unshortenButton.Disable()
self.translateButton = wx.Button(self.panel, -1, _(u"Translate message"), size=wx.DefaultSize)
self.translateButton.Enable(False)
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
self.okButton.SetDefault()
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
@ -281,7 +278,6 @@ class viewTweet(widgetUtils.BaseDialog):
self.unshortenButton = wx.Button(panel, -1, _(u"Expand URL"), size=wx.DefaultSize)
self.unshortenButton.Disable()
self.translateButton = wx.Button(panel, -1, _(u"Translate message"), size=wx.DefaultSize)
self.translateButton.Enable(False)
cancelButton = wx.Button(panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
cancelButton.SetDefault()
buttonsBox = wx.BoxSizer(wx.HORIZONTAL)
@ -337,7 +333,6 @@ class viewNonTweet(widgetUtils.BaseDialog):
self.unshortenButton = wx.Button(panel, -1, _(u"Expand URL"), size=wx.DefaultSize)
self.unshortenButton.Disable()
self.translateButton = wx.Button(panel, -1, _(u"Translate message"), size=wx.DefaultSize)
self.translateButton.Enable(False)
cancelButton = wx.Button(panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
cancelButton.SetDefault()
buttonsBox = wx.BoxSizer(wx.HORIZONTAL)