This commit is contained in:
yumoqing 2019-12-24 10:07:58 +08:00
parent 89e84240e0
commit 53e3a9ce6f
2 changed files with 7 additions and 3 deletions

View File

@ -51,6 +51,8 @@ class PageContainer(FloatLayout):
def previous(self,v=None): def previous(self,v=None):
if len(self.pageWidgets) <= 1: if len(self.pageWidgets) <= 1:
return return
w = self.pageWidgets[-1]
w.beforeDestroy()
self.pageWidgets = self.pageWidgets[:-1] self.pageWidgets = self.pageWidgets[:-1]
self.showLastPage() self.showLastPage()

View File

@ -194,7 +194,7 @@ class VPlayer(FloatLayout):
def beforeDestroy(self): def beforeDestroy(self):
try: try:
self.pause() self.stop()
except Exception as e: except Exception as e:
print_exc() print_exc()
return True return True
@ -358,8 +358,10 @@ class VPlayer(FloatLayout):
btn.source = blockImage('mute.jpg') btn.source = blockImage('mute.jpg')
def stop(self): def stop(self):
print(self) try:
self._video.state = 'stop' self._video.state = 'stop'
except:
print_exc()
def on_disabled(self,o,v): def on_disabled(self,o,v):
if self.disabled: if self.disabled: