def SectionMenu(): ###Anime-Centrum### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animecentrum'}, {'title': cFL('Anime-Centrum', 'blue')}, is_folder=True, fanart=fanartSiteCentrum, img=iconCentrum) ###Diff-Anime### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'diffanime'}, {'title': cFL('Diff-Anime', 'blue')}, is_folder=True, fanart=fanartSite, img=iconDiff) ###DramaQueen### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'DramaQueen'}, {'title': cFL('DramaQueen', 'blue')}, is_folder=True, fanart=fanartDrama, img=iconSite) ###Anime-Online### _addon.add_directory( {"mode": "SubMenu", "site": site, "section": "animeonline"}, {"title": cFL("Anime-Odcinki", "blue")}, is_folder=True, fanart=fanartAol, img=iconOdcinki, ) ###Anime-Shinden### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeshinden'}, {'title': cFL('Anime-Shinden', 'blue')}, is_folder=True, fanart=fanartAol, img=iconShniden) ###Anime-On### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeon'}, {'title': cFL('Anime-On', 'blue')}, is_folder=True, fanart=fanartAol, img=iconAnimeon) ###Ulubione### _addon.add_directory( {"mode": "FavoritesList", "site": site, "section": ""}, {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.1.name"), ps("cFL_color3"))}, fanart=fanartIPTV, img=iconFavs, ) _addon.add_directory( {"mode": "FavoritesList", "site": site, "section": "", "subfav": "2"}, {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.2.name"), ps("cFL_color3"))}, fanart=fanartIPTV, img=iconFavs, ) _addon.add_directory( {"mode": "FavoritesList", "site": site, "section": "", "subfav": "3"}, {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.3.name"), ps("cFL_color3"))}, fanart=fanartIPTV, img=iconFavs, ) _addon.add_directory( {"mode": "FavoritesList", "site": site, "section": "", "subfav": "4"}, {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.4.name"), ps("cFL_color3"))}, fanart=fanartIPTV, img=iconFavs, ) set_view("list", view_mode=addst("default-view")) eod()
def Browse_EpisodesCentrum(url, page='', content='episodes', view='515'): if url == '': return html = nURL(url) html = messupText(html, True, True) s = '<a href="http://(.+?)">Odcinek(.+?)</a>' matches = re.compile(s).findall(html) ItemCount = len(matches) if ItemCount > 0: for _url, _nazwa in matches: _url2 = 'http://' + urllib.quote(_url) _name = 'Odcinek' + _nazwa _title = '' + cFL_(_name) # grafika image = re.compile( '<meta property="og:image" content="(.+?)" />').findall(html) ItemCount = len(image) if len(image) > 0: for foto in image: img = foto else: img = "" # fanart image2 = re.compile( '<!--dle_image_begin:(.+?)</a><!--dle_image_end-->').findall( html) ItemCount = len(image2) if len(image2) > 0: for foto2 in image2: strona2 = foto2 image3 = re.compile('http:(.+?).jpg').findall(strona2) ItemCount = len(image3) if len(image3) > 0: for foto3 in image3: fanart = "http:" + foto3 + ".jpg" else: fanart = img # opis opis = re.compile('<strong>Opis:</strong>(.+)').findall(html) ItemCount = len(opis) if len(opis) > 0: for desc in opis: plot = desc labs = {} try: labs['plot'] = plot except: labs['plot'] = '' # wyciąganie linku do mp4 html2 = nURL(_url2) _link = re.compile('file: "(.+?)"').findall(html2) # _link = re.compile("<source src='(.+?)' type='video/mp4' />").findall(html2) ItemCount = len(_link) if len(_link) > 0: for link in _link: strona = link.replace(' ', '%20') ### contextLabs = { 'title': _name, 'year': '0000', 'url': _url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot'] } contextMenuItems = ContextMenu_Episodes(labs=contextLabs) pars = { 'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart } labs['title'] = _title _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount) set_view(content, int(addst('links-view'))) eod()
def Browse_EpisodesCentrum(url,page='',content='episodes',view='515'): if url == '': return html = nURL(url) html = messupText(html, True, True) s = '<a href="http://(.+?)">Odcinek(.+?)</a>' matches = re.compile(s).findall(html) ItemCount = len(matches) if ItemCount > 0: for _url, _nazwa in matches: _url2 = 'http://' + urllib.quote(_url) _name = 'Odcinek' + _nazwa _title = '' + cFL_(_name) # grafika image = re.compile('<meta property="og:image" content="(.+?)" />').findall(html) ItemCount = len(image) if len(image) > 0: for foto in image: img = foto else: img = "" # fanart image2 = re.compile('<!--dle_image_begin:(.+?)</a><!--dle_image_end-->').findall(html) ItemCount = len(image2) if len(image2) > 0: for foto2 in image2: strona2 = foto2 image3 = re.compile('http:(.+?).jpg').findall(strona2) ItemCount = len(image3) if len(image3) > 0: for foto3 in image3: fanart = "http:" + foto3 + ".jpg" else: fanart = img # opis opis = re.compile('<strong>Opis:</strong>(.+)').findall(html) ItemCount = len(opis) if len(opis) > 0: for desc in opis: plot = desc labs = {} try: labs['plot'] = plot except: labs['plot'] = '' # wyciąganie linku do mp4 html2 = nURL(_url2) _link = re.compile('file: "(.+?)"').findall(html2) # _link = re.compile("<source src='(.+?)' type='video/mp4' />").findall(html2) ItemCount = len(_link) if len(_link) > 0: for link in _link: strona = link.replace(' ', '%20') ### contextLabs = {'title': _name, 'year': '0000', 'url': _url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']} contextMenuItems = ContextMenu_Episodes(labs=contextLabs) pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart} labs['title'] = _title _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount) set_view(content, int(addst('links-view'))) eod()
def SectionMenu(): ###Anime-Centrum### _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animecentrum'}, {'title': cFL('Anime-Centrum', 'blue')}, is_folder=True, fanart=fanartSiteCentrum, img=iconCentrum) ###Diff-Anime### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'diffanime'}, {'title': cFL('Diff-Anime', 'blue')}, is_folder=True, fanart=fanartSite, img=iconDiff) ###DramaQueen### # _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'DramaQueen'}, {'title': cFL('DramaQueen', 'blue')}, is_folder=True, fanart=fanartDrama, img=iconSite) ###Anime-Online### _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeonline'}, {'title': cFL('Anime-Odcinki', 'blue')}, is_folder=True, fanart=fanartAol, img=iconOdcinki) ###Anime-Shinden### _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeshinden'}, {'title': cFL('Anime-Shinden', 'blue')}, is_folder=True, fanart=fanartAol, img=iconShniden) ###Anime-On### _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeon'}, {'title': cFL('Anime-On', 'blue')}, is_folder=True, fanart=fanartAol, img=iconAnimeon) ###Ulubione### _addon.add_directory({'mode': 'FavoritesList', 'site': site, 'section': ''}, {'title': cFL_(ps('WhatRFavsCalled') + addst('fav.tv.1.name'), ps('cFL_color3'))}, fanart=fanartIPTV, img=iconFavs) _addon.add_directory({'mode': 'FavoritesList', 'site': site, 'section': '', 'subfav': '2'}, {'title': cFL_(ps('WhatRFavsCalled') + addst('fav.tv.2.name'), ps('cFL_color3'))}, fanart=fanartIPTV, img=iconFavs) _addon.add_directory({'mode': 'FavoritesList', 'site': site, 'section': '', 'subfav': '3'}, {'title': cFL_(ps('WhatRFavsCalled') + addst('fav.tv.3.name'), ps('cFL_color3'))}, fanart=fanartIPTV, img=iconFavs) _addon.add_directory({'mode': 'FavoritesList', 'site': site, 'section': '', 'subfav': '4'}, {'title': cFL_(ps('WhatRFavsCalled') + addst('fav.tv.4.name'), ps('cFL_color3'))}, fanart=fanartIPTV, img=iconFavs) set_view('list', view_mode=addst('default-view')) eod()