def LINKSP5(mname, url): main.GA("Noobroom", "Watched") ok = True try: mname = mname.replace('[COLOR red]', '').replace('[/COLOR]', '') xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Opening Link,9000)") stream_url = find_noobroom_video_url(url) infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR=FF67cc33]Starplay[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: main.ErrorReport(e) return ok
def LINKINT(mname, url): main.GA("Einthusan", "Watched") ok = True MainUrl = "http://www.einthusan.com/movies/" link = main.OPENURL(url) try: match = re.compile("'hd-2': { 'file': '(.+?)'").findall(link) thumb = re.compile('<img src="(../images.+?)"').findall(link) infoLabels = main.GETMETAT(mname, '', '', thumb[0]) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } desc = ' ' for stream_url in match: continue infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'], season=season, episode=episode, year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]Einthusan[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=MainUrl + thumb[0], fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKFS(name,murl): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA("SokroStream","Watched") stream_url = False ok=True infoLabels =main.GETMETAT(name,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } if 'frenchstream'in murl: murl=GetLink(murl) stream_url = main.resolve_url(murl) print stream_url try: listitem = xbmcgui.ListItem(thumbnailImage=img) listitem.setInfo('video', {'Title': name, 'Year': ''} ) infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(name+' '+'[COLOR green]SokroStream[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def downloadFile(url,dest): try: urllib.urlretrieve(url,dest) except Exception, e: dialog = xbmcgui.Dialog() main.ErrorReport(e) dialog.ok("Mash Up", "Report the error below at " + main.supportsite, str(e), "We will try our best to help you")
def LINK(name, murl, thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA("Yify", "Watched") stream_url = False ok = True infoLabels = main.GETMETAT(name, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } stream_url = main.resolve_url(murl) try: infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark from resources.universal import playbackengine if stream_url: main.CloseAllDialogs() player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'], season=season, episode=episode, year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(name + ' ' + '[COLOR green]Yify[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAYLINK(mname, murl): name = main.removeColoredText(mname) main.GA("IceFilms", "Watched") ok = True infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] murl = resolveIceLink(murl) infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(murl) infoL = { 'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=name, season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]IceFilms[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKWATCHS(mname,murl): main.GA("Watchseries","Watched") ok=True playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() match=re.compile('(.+?)xocx(.+?)xocx').findall(murl) for hurl, durl in match: furl=geturl('http://watchseries.lt'+hurl) xbmc.executebuiltin("XBMC.Notification(Please Wait!,Checking Link,1500)") link=main.OPENURL(durl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match2=re.compile('<h1 class=".+?"><a href=".+?">.+?</a> - <a href="(.+?)" title=".+?">.+?</a>').findall(link) for xurl in match2: link2=main.OPENURL('http://watchseries.lt'+xurl) link2=link2.replace('\r','').replace('\n','').replace('\t','').replace(' ','') descr=re.compile('<b>Description :</b>(.+?)<').findall(link2) if len(descr)>0: desc=descr[0] else: desc='' thumbs=re.compile('<td style=".+?"><a href=".+?"><img src="(.+?)"').findall(link2) if len(thumbs)>0: thumb=thumbs[0] else: thumb='' genres=re.compile('<b>Genre: <a href=.+?>(.+?)</a>').findall(link2) if len(genres)>0: genre=genres[0] else: genre='' infoLabels =main.GETMETAEpiT(mname,thumb,desc) video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } media = urlresolver.HostedMediaFile(furl) source = media try: if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,4000)") stream_url = source.resolve() else: stream_url = False infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]WatchSeries[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def DownloaderClass2(url, dest): try: urllib.urlretrieve(url, dest) except Exception, e: dialog = xbmcgui.Dialog() main.ErrorReport(e) dialog.ok("filmesonlinegratis", "Report the error below", str(e), "We will try our best to help you")
def LINK(name,murl,thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") main.GA(prettyName,"Watched") stream_url = False ok=True infoLabels =main.GETMETAT(name,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(murl) keys=re.findall('(?sim)vkey=(.+?)&',link) if keys: vurl='http://www.pinit.tv/embedplayer.php?width=620&height=465&vkey='+keys[0]+'&autoplay=true&subtitles=' link=main.OPENURL(vurl) key=re.findall('href="(rtmp://[^"]+?)">Play',link) stream_url = key[0] id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0] else: urllist=[] epiList=[] match=re.findall('(?sim)<a href="([^"]+?)" target="_blank">([^<]+?)</a>',link) for url,epi in match: urllist.append(url) epiList.append(epi) dialog = xbmcgui.Dialog() ret = dialog.select('[COLOR=FF67cc33][B]Select Episode[/COLOR][/B]',epiList) if ret == -1: return link2=main.OPENURL(urllist[ret]) key=re.findall('href="(rtmp[^"]+?)">Play',link2) stream_url = key[0] id=re.findall('rtmp://.+?/pinit/(\d+)_.+?.mp4',key[0])[0] name=epiList[ret] try: infoL={'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']} # play with bookmark from resources.universal import playbackengine if stream_url: main.CloseAllDialogs() player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) player.setSubtitles('http://www.pinit.tv/subs/'+id+'.srt') #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(name+' '+'[COLOR green]'+prettyName+'[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK(mname, murl, thumb, desc): link = main.OPENURL(murl) link = main.unescapes(link) ok = True try: match = re.compile( 'src="http://www.youtube.com/embed/(.+?).?autoplay=1&cc_load_policy=0.+?"' ).findall(link) if match: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Opening Link,3000)") stream_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + match[ 0] + "&hd=1" match2 = re.compile( 'src="http://player.vimeo.com/video/(.+?)"').findall(link) if match2: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(str('http://vimeo.com/' + match2[0])) if (stream_url == False): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)") return infoL = {'Title': mname, 'Plot': desc} # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname, season='', episode='', year='', img=thumb, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]Doc-Wire[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) else: xbmc.executebuiltin( "XBMC.Notification(Sorry!,Link deleted Or unplayable,5000)") return ok
def LINKFMA(mname,murl,thumb,desc): main.GA("FMA","Watched") sources = [] ok=True playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)") infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<span class=\'.+?\'>(.+?)</span></p><div class=\'.+?\'><img src=\'.+?\' /></div><a class=\'.+?\' href="(.+?)"').findall(link) import urlresolver for host, url in match: durl='http://www.freemoviesaddict.com/'+url redirect=main.REDIRECT(durl) hosted_media = urlresolver.HostedMediaFile(url=redirect, title=host) sources.append(hosted_media) if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) if source != False: try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname+' '+'[COLOR green]FMA[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def DownloaderClass(url, dest): try: dp = xbmcgui.DialogProgress() dp.create("filmesonlinegratis", "Downloading & Copying File", '') urllib.urlretrieve( url, dest, lambda nb, bs, fs, url=url: _pbhook(nb, bs, fs, url, dp)) except Exception, e: dialog = xbmcgui.Dialog() main.ErrorReport(e) dialog.ok("filmesonlinegratis", "Report the error below", str(e), "We will try our best to help you")
def PLAY(murl, name, index): print '>>>>>>>> INSIDE PLAY' ok = True hname = name # WORKING #murl = 'rtmp://live.server4sale.com/live/PTVnews swfUrl=http://live.server4sale.com:81/swfs/videoPlayer.swf live=true pageUrl=news.ptv.com.pk/livestreaming.asp' # END WORKING #murl = 'http://bglive-a.bitgravity.com/ndtv/247hi/live/native' murl = 'rtsp://46.249.213.87/broadcast/bollywoodaction2-tablet.3gp' murl = 'rtsp://46.249.213.87/broadcast/bollywoodhungama-tablet.3gp' murl = 'http://bglive-a.bitgravity.com/ndtv/247hi/live/native' if not murl: return False video_type = 'movie' season = '' episode = '' #img=infoLabels['cover_url'] #fanart =infoLabels['backdrop_url'] #imdb_id=infoLabels['imdb_id'] #infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = murl import urlresolver print 'INDIDE PLAY >>>>>>>>>>>>>>>>>>>>>: ' + stream_url stream_url = prepareVideoLink(stream_url) print 'INDIDE PLAY >>>>>>>>>>>>>>>>>>>>>: ' + stream_url #infoL={'Title': infoLabels['metaName'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='live', title=name, season=season, episode=episode, year='') #WatchHistory #if selfAddon.getSetting("whistory") == "true": # from resources.universal import watchhistory # wh = watchhistory.WatchHistory(addon_id) # wh.add_item(hname+' '+'[COLOR green]Movie25[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) #player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAY(name, url): ok = True hname = name name = name.split('[COLOR blue]')[0] name = name.split('[COLOR red]')[0] infoLabels = main.GETMETAT(name, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } try: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = urlresolver.resolve(url) infoL = { 'Title': infoLabels['metaName'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def downloadFileWithDialog(url, dest): try: dp = xbmcgui.DialogProgress() dp.create("channel_cut", "Downloading & Copying File", '') urllib.urlretrieve(url, dest, lambda nb, bs, fs, url=url: main._pbhook( nb, bs, fs, dp, time.time())) except Exception, e: dialog = xbmcgui.Dialog() main.ErrorReport(e) dialog.ok("channel_cut", "Report the error below at " + main.supportsite, str(e), "We will try our best to help you")
def LINKS3arabtv(mname, murl, thumb): main.GA("3Arabtv", "Watched") xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") link = main.OPENURL(murl) ok = True match = re.compile('<iframe id="playerframe" src="([^<]+)"', re.DOTALL).findall(link) if match: stream_url = resolveVID(MAINURL + match[0].replace('/inter.php?u=', '')) else: return try: if stream_url == False: return infoL = { 'Title': mname, 'Plot': '', 'Genre': '', 'originaltitle': mname } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname, season='', episode='', year='', img=thumb, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]3Arabtv[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return True except Exception, e: if stream_url != False: main.ErrorReport(e) return False
def PLAY(mname,murl,thumb): main.GA("Dramania","Watched") ok=True r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } try : xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName']) from resources.universal import playbackengine if "'," in murl: mname=main.removeColoredText(mname) pl=xbmc.PlayList(1);pl.clear() playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0]) for xname,link in playlist: pl.add(getLink(link),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img)) xbmc.Player().play(pl) while xbmc.Player().isPlaying(): xbmc.sleep(2500) else: stream_url = getLink(murl) # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname+' '+'[COLOR green]Dramania[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def VIDEOLINKS(mname,url): ok=True hname=mname hname=hname.split(' online')[0] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") r=re.findall('Season(.+?)Episode([^<]+)',mname) if r: mname=mname.split(' [COLOR blue]')[0] infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: mname=mname.split(' [COLOR blue]')[0] infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } r=re.findall('xoxv(.+?)xoxe(.+?)xoxc',url) import urlresolver for hoster, url in r: source = urlresolver.HostedMediaFile(host=hoster, media_id=url) try : xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import playbackengine, watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(hname+' '+'[COLOR=FF67cc33]TubePlus[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKVD(name, murl, thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") main.GA("Video Documentaire", "Watched") stream_url = False ok = True link = main.OPENURL(murl) try: match = re.compile('''<iframe.+?src="(.+?)".+?</iframe>''', re.DOTALL).findall(link)[0] if 'http:' not in match: match = 'http:' + match stream_url = main.resolve_url(match.replace('?rel=0', '')) except: xbmc.executebuiltin( "XBMC.Notification(Sorry!,Link Removed or Dead,3000)") try: listitem = xbmcgui.ListItem(thumbnailImage=thumb) listitem.setInfo('video', {'Title': name, 'Year': ''}) infoL = {'Title': name, 'Plot': '', 'Genre': ''} # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=name, season='', episode='', year='', img=thumb, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(name + ' ' + '[COLOR green]Video Documentaire[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infoL, img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK (mname,murl,thumb): main.GA("MkvMovies","Watched") sources = [] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)") link=main.OPENURL(murl) ok=True infoLabels =main.GETMETAT(mname,'','',thumb) video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } match=re.compile('<a href="([^<]+)" rel="nofollow">Click Here to Download</a>').findall(link) for url in match: match2=re.compile('http://(.+?)/.+?').findall(url) for host in match2: host = host.replace('www.','') match3=re.compile('rar').findall(url) if len(match3)==0: hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") stream_url = source.resolve() else: stream_url = False return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]MkvMovies[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def iWatchLINKB(mname,url): main.GA("iWatchonline","Watched") ok=True hname=mname xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") mname=mname.split(' [COLOR red]')[0] r=re.findall('Season(.+?)Episode([^<]+)',mname) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } link=main.OPENURL(url) link=main.unescapes(link) match=re.compile('<(?:iframe|pagespeed_iframe).+?src=\"(.+?)\"').findall(link) hosted_media = urlresolver.HostedMediaFile(match[0]) source=hosted_media try : if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(hname+' '+'[COLOR green]iWatchonline[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def iLiveLink(mname, murl, thumb): main.GA("iLive", "Watched") xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Stream,3000)") link = main.OPENURL(murl) ok = True try: playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') match = re.compile( 'http://www.ilive.to/embed/(.+?)&width=(.+?)&height=(.+?)&autoplay=true' ).findall(link) for fid, wid, hei in match: pageUrl = 'http://www.ilive.to/embedplayer.php?width=' + wid + '&height=' + hei + '&channel=' + fid + '&autoplay=true' link = main.OPENURL(pageUrl) playpath = re.compile('file: "(.+?).flv"').findall(link) if len(playpath) == 0: playpath = re.compile( 'http://snapshots.ilive.to/snapshots/(.+?)_snapshot.jpg' ).findall(thumb) for playPath in playpath: stream_url = 'rtmp://edge.isearch.to/edge playpath=' + playPath + " swfUrl=http://player.ilive.to/player_ilive_2.swf pageUrl=" + pageUrl + " live=1 timeout=15" listitem = xbmcgui.ListItem(thumbnailImage=thumb) listitem.setInfo('video', {'Title': mname, 'Genre': 'Live'}) playlist.add(stream_url, listitem) xbmcPlayer = xbmc.Player() xbmcPlayer.play(playlist) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]iLive[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def MLink(mname,suburl,thumb): main.GA(mname,"Watched") i=1 namelist=[] urllist=[] ok=True infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } suburl=main.unescapes(suburl) match=re.compile('<sublink>(.+?)</sublink><host>(.+?)</host>').findall(suburl) for url,host in match: namelist.append(host.upper()) urllist.append(url) dialog = xbmcgui.Dialog() answer =dialog.select("Pick Host", namelist) if answer != -1: murl=urllist[int(answer)] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)") else: return try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(murl) if(stream_url == False): return infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]VIPlaylist[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSMAILRU(mname, murl, thumb): main.GA("MailRu", "Watched") xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") link = main.OPENURL(murl) ok = True stream_url = resolve_mailru(murl) try: if stream_url == False: return infoL = { 'Title': mname, 'Plot': '', 'Genre': '', 'originaltitle': mname } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname, season='', episode='', year='', img=thumb, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) #wh.add_item(mname+' '+'[COLOR green]MAILRU[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return True except Exception, e: if stream_url != False: main.ErrorReport(e) return False
def LINKSP2B(mname,murl): main.GA("Newmyvideolinks","Watched") ok=True r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I) if r: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] else: infoLabels =main.GETMETAT(mname,'','','') video_type='movie' season='' episode='' img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() hosted_media = urlresolver.HostedMediaFile(murl) source = hosted_media try : if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]NewmyVideoLink[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINK(mname,murl): main.GA("dubzonline-"+mname,"Watched") sources = [] ok=True link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match = re.compile('''(?sim)Source.+?</b></span><iframe.+?src="(http://.+?)"''').findall(link) for url in match: match2=re.compile('http://(.+?)/.+?').findall(url) for host in match2: host = host.replace('www.','') if host =='firedrive.com' or host =='sockshare.com': url=url.replace('embed','file') hosted_media = urlresolver.HostedMediaFile(url=url, title=host) sources.append(hosted_media) if (len(sources)==0): xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(source.get_url()) if(stream_url == False): return # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img='',infolabels='', watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]Dubzonline[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img='', fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAYPFTV(mname,murl): host=murl.split('x1x8x')[0] media_id=murl.split('x1x8x')[1] main.GA(prettyName,"Watched") ok=True xbmc.executebuiltin("XBMC.Notification(Please Wait!,Checking Link,3000)") #furl=geturl(murl) infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } try: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") import urlresolver source = urlresolver.HostedMediaFile(host=host, media_id=media_id) if source: stream_url = source.resolve() infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname+' '+'[COLOR green]PFTV[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def PLAYBTV(mname,murl): furl=GETLINKBTV(murl) ok=True if furl=='': return ok else: infoLabels =main.GETMETAEpiT(mname,'','') video_type='episode' season=infoLabels['season'] episode=infoLabels['episode'] img=infoLabels['cover_url'] fanart =infoLabels['backdrop_url'] imdb_id=infoLabels['imdb_id'] infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) } media = urlresolver.HostedMediaFile(furl) source = media try: if source: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = source.resolve() else: stream_url = False infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]BTV[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok
def LINKSAFLAM(mname, murl, thumb): main.GA("Aflam1", "Watched") if 'car-auto' not in murl: link = aflamOPENURL(murl) match = re.compile( '<a class="btn default large text-right" href="(.+?)"', re.DOTALL).findall(link) if match: murl = match[0] murl = murl.replace(' ', '') xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)") print murl link = aflamOPENURL(murl) ok = True infoLabels = main.GETMETAT(mname, '', '', thumb) video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } match = re.compile("""<div id="Layer2".+?<iframe src='(.+?)'""", re.DOTALL).findall(link) if not match: match = re.compile('<div id="Layer2".+?<iframe src="(.+?)"', re.DOTALL).findall(link) if 'mail.ru' in match[0]: stream_url = get_mailru(match[0]) else: stream_url = main.resolve_url(match[0]) try: if stream_url == False: return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName'] } # play with bookmark stream_url = stream_url.replace(' ', '%20') from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory(addon_id) wh.add_item(mname + ' ' + '[COLOR green]Aflam1[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return True except Exception, e: if stream_url != False: main.ErrorReport(e) return False
def LINKSP3(mname, url): main.GA("Dailyfix", "Watched") sources = [] ok = True xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Hosts,8000)") infoLabels = main.GETMETAT(mname, '', '', '') video_type = 'movie' season = '' episode = '' img = infoLabels['cover_url'] fanart = infoLabels['backdrop_url'] imdb_id = infoLabels['imdb_id'] infolabels = { 'supports_meta': 'true', 'video_type': video_type, 'name': str(infoLabels['title']), 'imdb_id': str(infoLabels['imdb_id']), 'season': str(season), 'episode': str(episode), 'year': str(infoLabels['year']) } link = main.OPENURL(url) match = re.compile( "<a href='(.+?)' class='.+?' title='.+?' rel='.+?'>.+?</a").findall( link) import urlresolver main.CloseAllDialogs() for murl in match: host = re.compile("http://(.+?)\.[^/]+?/.+?").findall(murl) for hname in host: hname = hname.replace('www.', '').title() hosted_media = urlresolver.HostedMediaFile(url=murl, title="[COLOR blue]" + hname + "[/COLOR]") sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Movie doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) try: if source: xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Actual HD Movie Requires Buffer Time,7000)" ) stream_url = main.resolve_url(source.get_url()) else: stream_url = False return infoL = { 'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'] } # play with bookmark from resources.universal import playbackengine player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']), season=str(season), episode=str(episode), year=str(infoLabels['year']), img=img, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id=imdb_id) #WatchHistory if selfAddon.getSetting("whistory") == "true": from resources.universal import watchhistory wh = watchhistory.WatchHistory('plugin.video.movie25') wh.add_item(mname + ' ' + '[COLOR green]DailyFix[/COLOR]', sys.argv[0] + sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) return ok