Merge pull request #61 from viorel-m/master
Fix Kodi17 context menu when is default action, fix kickass contenter movie thumb
This commit is contained in:
		
						commit
						0656286fa6
					
				
							
								
								
									
										20
									
								
								Core.py
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								Core.py
									
									
									
									
									
								
							@ -1693,8 +1693,28 @@ class Core:
 | 
				
			|||||||
        xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
 | 
					        xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def context(self, params={}):
 | 
					    def context(self, params={}):
 | 
				
			||||||
 | 
					        if int(self.version_check()[:2]) < 17:
 | 
				
			||||||
            xbmc.executebuiltin("Action(ContextMenu)")
 | 
					            xbmc.executebuiltin("Action(ContextMenu)")
 | 
				
			||||||
            sys.exit()
 | 
					            sys.exit()
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            fixed = xbmcgui.Dialog().contextmenu(list=[(self.localize('Open')),
 | 
				
			||||||
 | 
					                                                    (self.localize('Download via Libtorrent')),
 | 
				
			||||||
 | 
					                                                    (self.localize('Download via T-client'))])
 | 
				
			||||||
 | 
					            if fixed == 0:
 | 
				
			||||||
 | 
					                xbmc.executebuiltin('XBMC.Container.Update(%s)' %
 | 
				
			||||||
 | 
					                                    ('%s?action=%s&url=%s') %
 | 
				
			||||||
 | 
					                                    (sys.argv[0], 'openTorrent', params['url']))
 | 
				
			||||||
 | 
					            elif fixed == 1:
 | 
				
			||||||
 | 
					                xbmc.executebuiltin('XBMC.RunPlugin(%s)' %
 | 
				
			||||||
 | 
					                                    ('%s?action=%s&url=%s') %
 | 
				
			||||||
 | 
					                                    (sys.argv[0], 'downloadLibtorrent', params['url']))
 | 
				
			||||||
 | 
					            elif fixed == 2:
 | 
				
			||||||
 | 
					                xbmc.executebuiltin('XBMC.RunPlugin(%s)' %
 | 
				
			||||||
 | 
					                                    ('%s?action=%s&url=%s') %
 | 
				
			||||||
 | 
					                                    (sys.argv[0], 'downloadFilesList', params['url']))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def version_check(self):
 | 
				
			||||||
 | 
					        return xbmc.getInfoLabel( "System.BuildVersion" )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def downloadFilesList(self, params={}):
 | 
					    def downloadFilesList(self, params={}):
 | 
				
			||||||
        from resources.utorrent.net import Download
 | 
					        from resources.utorrent.net import Download
 | 
				
			||||||
 | 
				
			|||||||
@ -143,7 +143,7 @@ class KickAssSo(Content.Content):
 | 
				
			|||||||
                                             'kinopoisk': ''}
 | 
					                                             'kinopoisk': ''}
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
                img = result.find('a', {'class': 'movieCover'}).find('img').get('src')
 | 
					                img = result.find('a', {'class': 'movieCover'}).find('img').get('src')
 | 
				
			||||||
                movieInfo['poster'] = 'http:' + img
 | 
					                movieInfo['poster'] = img if img.startswith('http:') else 'http:' + img
 | 
				
			||||||
            except:
 | 
					            except:
 | 
				
			||||||
                pass
 | 
					                pass
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user