def __onClose(self): self.restore_infobar_seek_config() self.session.nav.playService(self.oldService) try: from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.remove(self.hotplugCB) except: pass
def hotplugCB(self, dev, action): print "[hotplugCB]", dev, action if dev.startswith("sd") and action == "add": self.msgbox.close() hotplugNotifier.remove(self.hotplugCB) self.container.appClosed.append(self.dmesg_scanned) self.taskstring = "" self.cmd = "dmesg" print "executing " + self.cmd self.container.execute(self.cmd)
def exitCB(self, answer): if answer == True: self.playlistIOInternal.clear() if self.savePlaylistOnExit: print "save playlist" for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) if config.plugins.mediaplayer2.saveDirOnExit.getValue(): config.plugins.mediaplayer2.defaultDir.setValue(self.filelist.getCurrentDirectory()) config.plugins.mediaplayer2.defaultDir.save() hotplugNotifier.remove(self.hotplugCB) del self["coverArt"].picload self.close()
def exitCB(self, answer): if answer == True: self.playlistIOInternal.clear() if self.savePlaylistOnExit: print "save playlist" for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) if config.mediaplayer.saveDirOnExit.getValue(): config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory()) config.mediaplayer.defaultDir.save() hotplugNotifier.remove(self.hotplugCB) del self["coverArt"].picload self.close()
def exit(self): self.playlistIOInternal.clear() for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) if self.savePlaylistOnExit: try: self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) except IOError: print "couldn't save playlist.e2pls" if config.mediaplayer.saveDirOnExit.getValue(): config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory()) config.mediaplayer.defaultDir.save() from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.remove(self.hotplugCB) del self["coverArt"].picload self.close()
def exit(self): self.playlistIOInternal.clear() for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) if self.savePlaylistOnExit: try: self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) except IOError: print "couldn't save playlist.e2pls" if config.plugins.mediaplayer2.saveDirOnExit.getValue(): config.plugins.mediaplayer2.defaultDir.setValue(self.filelist.getCurrentDirectory()) config.plugins.mediaplayer2.defaultDir.save() from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.remove(self.hotplugCB) del self["coverArt"].picload self.close()
def removeHotplug(self): print "[removeHotplug]" hotplugNotifier.remove(self.hotplugCB)
def exit(self): del self.Console hotplugNotifier.remove(self.update) self.close()
def __onClose(self): print "__onClose" from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.remove(self.hotplugCB)
def removeHotplugNotifier(self): from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier if self.hotplugNotifier in hotplugNotifier: print "remove hotplugNotifier" hotplugNotifier.remove(self.hotplugNotifier)