Ejemplo n.º 1
0
	def move_to_album(self, *args, **kwargs):
		album = selector.album(_(u"Select the album where you want to move this video"), self.session, "video_albums")
		if album.item == None: return
		id = self.get_post()["id"]
		response = self.session.vk.client.video.addToAlbum(album_ids=album.item, video_id=id, target_id=self.session.user_id, owner_id=self.get_post()["owner_id"])
		if response == 1:
		# Translators: Used when the user has moved an video  to an album.
			output.speak(_(u"Moved"))
Ejemplo n.º 2
0
	def move_to_album(self, *args, **kwargs):
		album = selector.album(_(u"Select the album where you want to move this song"), self.session)
		if album.item == None: return
		id = self.get_post()["id"]
		response = self.session.vk.client.audio.moveToAlbum(album_id=album.item, audio_ids=id)
		if response == 1:
		# Translators: Used when the user has moved an audio to an album.
			output.speak(_(u"Moved"))
Ejemplo n.º 3
0
	def delete_video_album(self, *args, **kwargs):
		answer = selector.album(_(u"Select the album you want to delete"), self.session, "video_albums")
		if answer.item == None:
			return
		response = commonMessages.delete_audio_album()
		if response != widgetUtils.YES: return
		removal = self.session.vk.client.video.deleteAlbum(album_id=answer.item)
		buffer = self.search("{0}_video_album".format(answer.item,))
		buff = self.window.search(buffer.name)
		self.window.remove_buffer(buff)
		self.buffers.remove(buffer)
		del buffer
		self.session.video_albums = self.session.vk.client.video.getAlbums(owner_id=self.session.user_id)["items"]