Ejemplo n.º 1
0
	def do_update_metadata(self, totem, artist, title, album, num):
		self.current_metadata = self.null_metadata.copy()
		if title:
			self.current_metadata["title"] = title
		if artist:
			self.current_metadata["artist"] = artist
		if album:
			self.current_metadata["album"] = album
		if num:
			self.current_metadata["tracknumber"] = num

		if totem.is_playing():
			self.track_change(self.current_metadata)
Ejemplo n.º 2
0
	def do_notify(self, totem, status):
		if totem.is_playing():
			self.track_change(self.current_metadata)
		else:
			self.track_change(self.null_metadata)

		status = self.calculate_status()
		if status != self.old_status:
			self.status_change(status)

		caps = self.calculate_caps()
		if caps != self.old_caps:
			self.caps_change(caps)
Ejemplo n.º 3
0
	def do_notify(self, totem, status):
		if totem.is_playing():
			self.current_mrl = totem.get_current_mrl()
			self.notification.playingStarted(self.current_mrl, self.title, self.album, self.artist, self.duration)
		else:
			self.notification.playingStopped()