Esempio n. 1
0
def index(iconimage, fanart):
    BYB.addDir_file('Open settings', '', 100, iconimage, fanart,
                    'Open settings for addon', '', '', '')
    BYB.addDir_file('Delete Cookies', '', 101, iconimage, fanart,
                    'Clear all Cookies from Cookie cache', '', '', '')
    BYB.addDir('Dependencies OpenSettings', '', 102, iconimage, fanart,
               'Open settings of all dependencies required by this addon', '',
               '', '')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Esempio n. 2
0
def livesport_scrape_dir():
    from resources.lib.scrapers import streamshunter
    streamshunter = streamshunter.streamshunter()
    streamshunter.headers_get()
    for results in streamshunter.Dir:
        HeaderName = results.get('header_name', 'Header Name Missing')
        HeaderUrl = results.get('header_url', '')
        if len(HeaderUrl) > 0:
            BYB.addDir('[COLOR aqua]%s[/COLOR]' % HeaderName, HeaderUrl, 108,
                       paths.icon, paths.fanart, '', '', '', '')
Esempio n. 3
0
def AddAllContent(url,fanart):
	PodcastRss.Channel(url)
	for channel in PodcastRss.CHANNEL:
		title = channel.get('title','Title Missing')
		description = channel.get('description','')
		image = channel.get('image','')
		icon,fanart = _image(image,fanart)
		url = channel.get('rss_url','')
		BYB.addDir(title,url,201,icon,fanart,description,'Podcast','','')
		del PodcastRss.CHANNEL[:]
Esempio n. 4
0
def index(iconimage, fanart):
    BYB.addDir_file(ItemColor(local_string(30059)), '', 100, icon_Setting,
                    fanart_Setting, local_string(30068), '', '', '')
    BYB.addDir_file(ItemColor(local_string(30060)), '', 101, icon_Setting,
                    fanart_Setting, local_string(30069), '', '', '')
    BYB.addDir(ChannelColor(local_string(30061)), '', 102, icon_Setting,
               fanart_Setting, local_string(30070), '', '', '')
    BYB.addDir_file(ItemColor(local_string(30079)), '', 104, icon_Setting,
                    fanart_Setting, '', '', '', '')
    BYB.addDir_file(ItemColor(local_string(30080)), '', 105, icon_Setting,
                    fanart_Setting, '', '', '', '')
    BYB.addDir_file(ItemColor('Pairing Tool'), '', 106, icon_Setting,
                    fanart_Setting, '', '', '', '')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Esempio n. 5
0
def tmdb_season_episodes(fanart, url, iconimage):
    ApiKey = apikey()
    ID, season = re.findall('ID=(.*[0-9]):season=(.*[0-9]):', url)[0]
    BYBAPI.tmdb_tv_show_get_season_episodes(ID, season, ApiKey)
    EpisodeStartNo = int(BYBAPI.Details_list[0].get('episode_number', ''))
    ShowName = BYBAPI.tmdb_tv_show_title(ID, ApiKey)
    for items in BYBAPI.Details_list:
        episode_number = items.get('episode_number', '')
        if episode_number != '' or episode_number != None:
            if EpisodeStartNo != 1:
                episode_number = str(int(episode_number) + 1)
            else:
                episode_number = episode_number
        icon = items.get('still_path', '')
        if icon == '' or icon == None or not icon.endswith(('.png', '.jpg')):
            icon = iconimage
        try:
            AirDate = items.get('air_date', '').encode('utf-8', 'ignore')
        except:
            AirDate = ''
        try:
            year = dparser(AirDate)
            year = datetime.date.strftime(year, '%Y')
        except:
            year = ''
        name = items.get('name', '')
        if len(name) == 0:
            name = ShowName.encode('utf-8', 'ignore')
        else:
            name = name.encode('utf-8', 'ignore')

        try:
            description = items.get('overview', '').encode('utf-8', 'ignore')
        except:
            description = ''
        SearchString = '#search=tv:name={}:show_year=:year={}:season={}:episode={}:imdb=:tvdb=:debrid='.format(
            ShowName, year, season, episode_number)
        Dolog(SearchString, line_info=True)
        try:
            BYB.addDir(ItemColor('{}. {}'.format(episode_number,
                                                 name)), SearchString, 600,
                       icon, fanart, description, '', AirDate, '')
        except:
            pass
    del BYBAPI.Details_list[:]
Esempio n. 6
0
def tmdb_seasons(url, fanart, iconimage):
    ApiKey = apikey()
    seasons = BYBAPI.tmdb_tv_total_seasons(ApiKey, url)
    if int(seasons) > 1:
        BYBAPI.tmdb_tv_show_get_seasons(url, ApiKey)
        for items in BYBAPI.Details_list:
            ID = items.get('ID', '')
            overview = items.get('overview', '')
            season_number = items.get('season_number', '')
            info_string = 'ID={}:season={}:'.format(ID, season_number)
            description = '{} Episodes: {}'.format(
                items.get('episode_count', ''), overview.encode('utf-8'))
            BYB.addDir(ChannelColor(items.get('name', '').encode('utf-8')),
                       info_string, 502, items.get('poster_path', addon_icon),
                       fanart, description, '', '', '')
    else:
        tmdb_season_episodes(fanart, 'ID={}:season=1:'.format(url), iconimage)
    del BYBAPI.Details_list[:]
Esempio n. 7
0
def AddChannel(name,linkedUrl,thumbnail,fanArt,desc,genre,date,credits):
	YouTube_Scraper.channel_info(channel_url=linkedUrl)
	for items in YouTube_Scraper.CHANNEL_INFO:
		title = items.get('title','Title Missing')
		description = items.get('description','')
		icon = items.get('icon','')
		artwork = items.get('artwork','')
		channel_url = items.get('channel_url','')
		if name == '':
			name = title
		if thumbnail == '':
			thumbnail = icon
		if fanArt == '':
			fanArt = artwork
		if desc == '':
			desc = description
		BYB.addDir(ChannelColor(name),linkedUrl,28,iconimage=thumbnail,fanart=fanArt,description=desc,genre=genre,date=date,credits=credits)
		del YouTube_Scraper.CHANNEL_INFO[:]
Esempio n. 8
0
def livesport_index():
    BYB.addDir('[COLOR gold]Scrapers[/COLOR]', '', 106, paths.icon,
               paths.fanart, '', '', '', '')
    BYB.addDir('[COLOR gold]Direct Links[/COLOR]', '', 107, paths.icon,
               paths.fanart, '', '', '', '')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Esempio n. 9
0
def tmdb_list(url):
    imdb = ''
    debrid = False
    ApiKey = apikey()
    Page = '1'
    PageTotal = '0'
    if not 'page=' in url:
        ListAssign = url.replace('=:', '=none:')
        ListAssignItems = re.compile(
            r'tmdb=(.+?):list_id=(.+?):list_type=(.+?):=list').findall(
                ListAssign)
        for ListHeader, ListId, ListType in ListAssignItems:
            if ListHeader.lower() == 'list':
                BYBAPI.tmdb_list_get_items(ApiKey, ListId)
            elif ListHeader.lower() == 'company':
                BYBAPI.tmdb_company_get_results(ApiKey, ListId, ListType)
                Page, PageTotal = BYBAPI.tmdb_company_get_results_page_counter(
                    ApiKey, ListId, ListType)
            elif ListHeader == 'movie' or ListHeader == 'tv':
                BYBAPI.tmdb_movietv_get_lists(ApiKey, ListHeader, ListType)
                Page, PageTotal = BYBAPI.tmdb_movietv_get_lists_page_counter(
                    ApiKey, ListHeader, ListType)
            elif ListHeader.lower() == 'network':
                BYBAPI.tmdb_networks_get_results(ApiKey, ListId)
                Page, PageTotal = BYBAPI.tmdb_networks_get_results_page_counter(
                    ApiKey, ListId)
                Dolog('Page={} PageTotal={}'.format(Page, PageTotal),
                      line_info=True)
    elif 'page=' in url:
        ListAssign = url.replace('=:', '=none:')
        ListAssignItems = re.compile(
            r'tmdb=(.+?):list_id=(.+?):list_type=(.+?):page=(.+?):=list'
        ).findall(ListAssign)
        for ListHeader, ListId, ListType, Page in ListAssignItems:
            if ListHeader.lower() == 'list':
                BYBAPI.tmdb_list_get_items(ApiKey, ListId)
            elif ListHeader.lower() == 'company':
                BYBAPI.tmdb_company_get_results(ApiKey, ListId, ListType, Page)
                Page, PageTotal = BYBAPI.tmdb_company_get_results_page_counter(
                    ApiKey, ListId, ListType, Page)
            elif ListHeader == 'movie' or ListHeader == 'tv':
                BYBAPI.tmdb_movietv_get_lists(ApiKey, ListHeader, ListType,
                                              Page)
                Page, PageTotal = BYBAPI.tmdb_movietv_get_lists_page_counter(
                    ApiKey, ListHeader, ListType, Page)
            elif ListHeader.lower() == 'network':
                BYBAPI.tmdb_networks_get_results(ApiKey, ListId, Page)
                Page, PageTotal = BYBAPI.tmdb_networks_get_results_page_counter(
                    ApiKey, ListId, Page)
    for items in BYBAPI.Details_list:
        name = items.get('title', 'Title Missing')
        date = items.get('release_date', '')
        Year = date.split('-')[0]
        MediaType = items.get('mediatype', '').lower()
        TmdbDataString = ''
        if _Edit.TMDBMovieList == 'search_addon':
            mode = 404
            TmdbDataString = 'tmdb={}'.format(items.get('ID', ''))
        elif _Edit.TMDBMovieList == 'search_internet':
            if MediaType == 'movie' or ListHeader == 'movie' or ListType == 'movies':
                mode = 600
                TmdbDataString = '#search=movies:name={}:year={}:imdb={}:debrid={}'.format(
                    name.encode('utf-8', 'ignore').strip(':'), Year, imdb,
                    debrid)
            elif MediaType == 'tv' or ListHeader == 'tv' or ListType == 'tv':
                mode = 501
                TmdbDataString = str(items.get('ID', ''))
        Name = name if len(name) > 0 else 'Name Missing'
        Name = '{}'.format(Name.encode('utf-8', 'ignore').strip(':'))
        BYB.addDir(ChannelColor(Name), TmdbDataString, mode,
                   items.get('poster_path', icon_tmdb),
                   items.get('backdrop_path', fanart_tmdb),
                   items.get('overview', '').encode('utf-8', 'ignore'),
                   items.get('Genres', ''), date.encode('utf-8', 'ignore'), '')
    if int(Page) + 1 <= int(PageTotal):
        NextPage = str(int(Page) + 1)
        BYB.addDir(
            ChannelColor('Next Page {}'.format(NextPage)),
            'tmdb={}:list_id={}:list_type={}:page={}:=list'.format(
                ListHeader, ListId, ListType, NextPage), 500, icon_nextpage,
            addon_fanart, 'Next Page {} of {}'.format(NextPage,
                                                      PageTotal), '', '', '')
Esempio n. 10
0
def indexs(name,url,iconimage,fanart):
	BYB.addDir(ChannelColor(local_string(30050)),url,29,iconimage,fanart,'','','','')
	BYB.addDir(ChannelColor(local_string(30051)),url,31,iconimage,fanart,'','','','')
	BYB.addDir(ChannelColor(local_string(30052)),url,32,iconimage,fanart,'','','','')
	xbmcplugin.endOfDirectory(int(sys.argv[1]))
Esempio n. 11
0
def index():
    BYB.addDir(
        ChannelColor('RetroClassic Movies'), '', 901,
        'https://i.pinimg.com/originals/4e/bf/1b/4ebf1bccb1c6d456ef934f39412a7aff.png',
        addon_fanart, '', '', '', '')