Fixes to crashes when MythVideo is not installed
This commit is contained in:
parent
46a50de811
commit
e56d73ea53
Binary file not shown.
|
@ -239,7 +239,7 @@ class Module():
|
|||
#Check that the library actually contains something
|
||||
#if len(self.currentViewer.textureLibrary) == 0:
|
||||
if self.currentViewer is None:
|
||||
self.MenuMgr.display_msg("Error: No videos", "There are no videos available in the library. This maybe caused by an empty library or a failed connection to the server.")
|
||||
self.glossMgr.display_msg("Error: No videos", "There are no videos available in the library. This maybe caused by an empty library or a failed connection to the server.")
|
||||
self.stop()
|
||||
return
|
||||
|
||||
|
@ -304,11 +304,11 @@ class Module():
|
|||
timeline_stop = clutter.Timeline(10,30)
|
||||
alpha = clutter.Alpha(timeline_stop, clutter.ramp_inc_func)
|
||||
self.stop_behaviour = clutter.BehaviourOpacity(opacity_start=255, opacity_end=0, alpha=alpha)
|
||||
self.stop_behaviour.apply(self.currentViewer)
|
||||
self.stop_behaviour.apply(self.backdrop)
|
||||
self.stop_behaviour.apply(self.folderLibrary[self.folder_level])
|
||||
self.stop_behaviour.apply(self.video_details)
|
||||
self.stop_behaviour.apply(self.covers_background)
|
||||
if not self.currentViewer is None: self.stop_behaviour.apply(self.currentViewer)
|
||||
if not self.backdrop is None: self.stop_behaviour.apply(self.backdrop)
|
||||
if not self.folderLibrary[self.folder_level] is None: self.stop_behaviour.apply(self.folderLibrary[self.folder_level])
|
||||
if not self.video_details is None: self.stop_behaviour.apply(self.video_details)
|
||||
if not self.covers_background is None: self.stop_behaviour.apply(self.covers_background)
|
||||
timeline_stop.connect('completed', self.destroyPlugin)
|
||||
timeline_stop.start()
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ class mythDB():
|
|||
self.connected = True
|
||||
except MySQLdb.Error, e:
|
||||
print "Error %d: %s" % (e.args[0], e.args[1])
|
||||
clutter.main_quit()
|
||||
self.connected = False
|
||||
return None
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue