Example #1
0
def updateStatus():
	if not ShareSocial.shareTargetAvailable('status','script.module.sharesocial'):
		xbmcgui.Dialog().ok('Failed','No status update targets available.')
		return
	share = ShareSocial.getShare('script.module.sharesocial', 'status')
	share.askMessage('Enter Status Message')
	if not share.message: return
	share.share(withall=True)
Example #2
0
	def doContextMenu(self):
		menu = ShareSocial.ChoiceMenu('Options')
		menu.addItem('update_status','Update Status')
		menu.addItem('refresh','Refresh Feeds')
		menu.addItem('manage_feeds','Manage Feeds')
		menu.addItem('settings','Settings')
		f = self.feedList.getSelectedItem().feeditem
		if f:
			if f.share and ShareSocial.shareTargetAvailable(f.share.shareType,'script.module.sharesocial'):
				menu.addItem(None,None)
				menu.addItem('share','Share %s...' % f.share.shareType)
			if f.share: f.share.updateData()
			if f.share and f.share.shareType == 'video':
				menu.addItem('watch_video','Watch Video')
			elif f.share and f.share.shareType == 'image':
				if f.share.media:
					menu.addItem('view_image','View Image')
			elif f.get('textimage'):
				menu.addItem('view_picture','View Image')
			
		result = menu.getResult()
		if not result: return
		if result == 'update_status':
			updateStatus()
		elif result == 'refresh':
			self.fillFeedList()
		elif result == 'manage_feeds':
			self.manageFeedsMenu()
		elif result == 'settings':
			ShareSocial.__addon__.openSettings() #@UndefinedVariable
		elif result == 'share':
			f.share.share()
		elif result == 'watch_video':
			self.showVideo(f.share.media)
		elif result == 'view_image':
			self.showImage(f.share.media)
		elif result == 'view_picture':
			url = self.feedList.getSelectedItem().getProperty('picture')
			print url
			self.showImage(url)