def createstrm(name, imdbid, year, url): addon_id = links.link().muchm_id addon_path = os.path.join(links.link().installfolder, addon_id) addon_getsettings = links.link().getSetting("muchm_enabled") addon_pos = links.link().getSetting("muchm_pos") if len(addon_pos) == 1: addon_pos = '0' + addon_pos srtmBasePath = links.link().strmPath addonplay = links.link().muchm_play if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("muchm_enabled", 'false') if addon_getsettings == 'true': name = name + ' (' + year + ')' origname = name strmPath = os.path.join(srtmBasePath, addon_pos + '.' + addon_id + '.strm') searchresponse = '<a href="(.+?)">%s</a>' % name.replace( '(', '\(').replace(')', '\)') name = name.replace('(', '').replace(')', '').replace(' ', '-') url = links.link().muchm_base % search.basic_search( links.link().muchm_search, name, imdbid, year, searchresponse, 'Name') if url: playurl = addonplay % (urllib.quote_plus(origname), urllib.quote_plus(url)) basic.writefile(strmPath, 'w', playurl)
def createstrm(name,imdbid,year,url): addon_id = links.link().rato_id addon_path = os.path.join(links.link().installfolder,addon_id) addon_getsettings = links.link().getSetting("rato_enabled") addon_pos = links.link().getSetting("rato_pos") if len(addon_pos) == 1: addon_pos = '0'+addon_pos srtmBasePath = links.link().strmPath addonplay = links.link().rato_play if not os.path.exists(addon_path) and addon_getsettings: links.link().setSetting("rato_enabled",'false') if addon_getsettings == 'true': strmPath = os.path.join(srtmBasePath,addon_pos+'.'+addon_id+'.strm') url = search.basic_search(links.link().rato_search,name,imdbid,year,'<span class="more-btn"><a href="(.+?)" >Ver Agora</a>','IMDB') if url: playurl = addonplay % (url,urllib.quote_plus(name)) basic.writefile(strmPath,'w',playurl)
def createstrm(name,imdbid,year,url): addon_id = links.link().wt_id addon_path = os.path.join(links.link().installfolder,addon_id) addon_getsettings = links.link().getSetting("wt_enabled") addon_pos = links.link().getSetting("wt_pos") if len(addon_pos) == 1: addon_pos = '0'+addon_pos srtmBasePath = links.link().strmPath addonplay = links.link().wt_play if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("wt_enabled",'false') if addon_getsettings == 'true': strmPath = os.path.join(srtmBasePath,addon_pos+'.'+addon_id+'.strm') url = search.basic_search(links.link().wt_search,name,imdbid,year,'<a href="(.+?)" class="movie-name">','NameYear') if url: playurl = addonplay % (urllib.quote_plus(links.link().wt_base % url),urllib.quote_plus(name)) basic.writefile(strmPath,'w',playurl)
def createstrm(name,imdbid,year,url): addon_id = links.link().yify_id addon_path = os.path.join(links.link().installfolder,addon_id) addon_getsettings = links.link().getSetting("yify_enabled") addon_pos = links.link().getSetting("yify_pos") addonplay = links.link().yify_play if len(addon_pos) == 1: addon_pos = '0'+addon_pos srtmBasePath = links.link().strmPath if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("yify_enabled",'false') if addon_getsettings == 'true': strmPath = os.path.join(srtmBasePath,addon_pos+'.'+addon_id+'.strm') searchresponse = '"title":"%s","link":"(.+?)","post_content":".+?","image":".+?","year":"%s"' % (name,year) url = search.basic_search(links.link().yify_search,name,imdbid,year,searchresponse,'Name') if url: playurl = addonplay % (urllib.quote_plus(name+' ('+year+')'),urllib.quote_plus(url)) basic.writefile(strmPath,'w',playurl)
def createstrm(name,imdbid,year,url): addon_id = links.link().muchm_id addon_path = os.path.join(links.link().installfolder,addon_id) addon_getsettings = links.link().getSetting("muchm_enabled") addon_pos = links.link().getSetting("muchm_pos") if len(addon_pos) == 1: addon_pos = '0'+addon_pos srtmBasePath = links.link().strmPath addonplay = links.link().muchm_play if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("muchm_enabled",'false') if addon_getsettings == 'true': name = name +' ('+year+')' origname = name strmPath = os.path.join(srtmBasePath,addon_pos+'.'+addon_id+'.strm') searchresponse = '<a href="(.+?)">%s</a>' % name.replace('(','\(').replace(')','\)') name = name.replace('(','').replace(')','').replace(' ','-') url = links.link().muchm_base % search.basic_search(links.link().muchm_search,name,imdbid,year,searchresponse,'Name') if url: playurl = addonplay % (urllib.quote_plus(origname),urllib.quote_plus(url)) basic.writefile(strmPath,'w',playurl)
def createstrm(name, imdbid, year, url): addon_id = links.link().wt_id addon_path = os.path.join(links.link().installfolder, addon_id) addon_getsettings = links.link().getSetting("wt_enabled") addon_pos = links.link().getSetting("wt_pos") if len(addon_pos) == 1: addon_pos = '0' + addon_pos srtmBasePath = links.link().strmPath addonplay = links.link().wt_play if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("wt_enabled", 'false') if addon_getsettings == 'true': strmPath = os.path.join(srtmBasePath, addon_pos + '.' + addon_id + '.strm') url = search.basic_search(links.link().wt_search, name, imdbid, year, '<a href="(.+?)" class="movie-name">', 'NameYear') if url: playurl = addonplay % (urllib.quote_plus( links.link().wt_base % url), urllib.quote_plus(name)) basic.writefile(strmPath, 'w', playurl)
def createstrm(name, imdbid, year, url): addon_id = links.link().yify_id addon_path = os.path.join(links.link().installfolder, addon_id) addon_getsettings = links.link().getSetting("yify_enabled") addon_pos = links.link().getSetting("yify_pos") addonplay = links.link().yify_play if len(addon_pos) == 1: addon_pos = '0' + addon_pos srtmBasePath = links.link().strmPath if not os.path.exists(addon_path) and addon_getsettings == 'true': links.link().setSetting("yify_enabled", 'false') if addon_getsettings == 'true': strmPath = os.path.join(srtmBasePath, addon_pos + '.' + addon_id + '.strm') searchresponse = '"title":"%s","link":"(.+?)","post_content":".+?","image":".+?","year":"%s"' % ( name, year) url = search.basic_search(links.link().yify_search, name, imdbid, year, searchresponse, 'Name') if url: playurl = addonplay % (urllib.quote_plus(name + ' (' + year + ')'), urllib.quote_plus(url)) basic.writefile(strmPath, 'w', playurl)