2017-04-22, 03:53
Hello,
I'm trying to edit ganool addon and it work but when I stop the player it continue download the movie in the background and it repeat playing or create new session for same movie. here the code
I'm trying to edit ganool addon and it work but when I stop the player it continue download the movie in the background and it repeat playing or create new session for same movie. here the code
Code:
def GetLinks1(section, url, img, text):
html = net.http_GET(url, headers).content
content = html
match = re.compile('<center><a style="margin-top:20px;" href="(http://www.mediafire.com/.*?)" class="btn btn-default">').findall(content)
listitem = GetMediaInfo(content)
for url in match:
addon.add_directory({'mode': 'PlayVideo', 'url': url, 'listitem': listitem}, {'title': host}, img= img, fanart= 'http://imgprix.com/web/wallpapers/private-cinema-room/2560x1600.jpg')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def PlayVideo(url, listitem):
try:
print 'play in PlayVideo %s' % url
xbmc.Player().play(url)
addon.add_directory({'mode': 'help'}, {'title': '[COLOR slategray][B]^ Press back ^[/B] [/COLOR]'},'','')
except:
xbmc.executebuiltin("XBMC.Notification([COLOR red][B]Sorry Link may have been removed ![/B][/COLOR],[COLOR lime][B]Please try a different link/host !![/B][/COLOR],7000,"")")