Пример #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
Пример #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
Пример #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)
Пример #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)
Пример #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()
Пример #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()
Пример #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()
Пример #8
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.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()
Пример #9
0
 def removeHotplug(self):
     print "[removeHotplug]"
     hotplugNotifier.remove(self.hotplugCB)
Пример #10
0
 def exit(self):
     del self.Console
     hotplugNotifier.remove(self.update)
     self.close()
Пример #11
0
	def removeHotplug(self):
		print "[removeHotplug]"
		hotplugNotifier.remove(self.hotplugCB)
Пример #12
0
 def exit(self):
     del self.Console
     hotplugNotifier.remove(self.update)
     self.close()
Пример #13
0
 def __onClose(self):
     print "__onClose"
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     hotplugNotifier.remove(self.hotplugCB)
Пример #14
0
 def removeHotplugNotifier(self):
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     if self.hotplugNotifier in hotplugNotifier:
         print "remove hotplugNotifier"
         hotplugNotifier.remove(self.hotplugNotifier)
Пример #15
0
 def removeHotplugNotifier(self):
     from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
     if self.hotplugNotifier in hotplugNotifier:
         print "remove hotplugNotifier" 
         hotplugNotifier.remove(self.hotplugNotifier)