Example #1
0
 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
Example #2
0
 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
Example #3
0
 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)
Example #4
0
	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)
Example #5
0
	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()
Example #6
0
	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()
Example #7
0
	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()
Example #9
0
 def removeHotplug(self):
     print "[removeHotplug]"
     hotplugNotifier.remove(self.hotplugCB)
Example #10
0
 def exit(self):
     del self.Console
     hotplugNotifier.remove(self.update)
     self.close()
Example #11
0
	def removeHotplug(self):
		print "[removeHotplug]"
		hotplugNotifier.remove(self.hotplugCB)
 def exit(self):
     del self.Console
     hotplugNotifier.remove(self.update)
     self.close()
Example #13
0
 def __onClose(self):
     print "__onClose"
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     hotplugNotifier.remove(self.hotplugCB)
Example #14
0
 def removeHotplugNotifier(self):
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     if self.hotplugNotifier in hotplugNotifier:
         print "remove hotplugNotifier"
         hotplugNotifier.remove(self.hotplugNotifier)
Example #15
0
 def removeHotplugNotifier(self):
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     if self.hotplugNotifier in hotplugNotifier:
         print "remove hotplugNotifier" 
         hotplugNotifier.remove(self.hotplugNotifier)