Beispiel #1
0
def ADD_SHOW_ITEM(showdata, mode='listtv', submode='LIST_TV_SEASONS', cmmode=0):
    asin, seriestitle, plot, network, mpaa, genres, actors, premiered, year, stars, votes, seasontotal, episodetotal, audio, isHD, isprime, empty, empty, empty, poster, banner, fanart = showdata
    infoLabels = {'Title': seriestitle,
                  'Plot': plot,
                  'mediatype': "tvshow",
                  'MPAA': mpaa,
                  'Cast': actors.split(',') if actors else None,
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Episode': episodetotal,
                  'TotalSeasons': seasontotal,
                  'Studio': network,
                  'AudioChannels': audio
                  }
    infoLabels = {k: v for k, v in infoLabels.items() if v}
    submode = 'LIST_TV_SEASONS' if mode == 'listtv' else submode
    poster = '' if not poster else poster
    infoLabels['Thumb'] = poster
    infoLabels['Fanart'] = fanart
    infoLabels['Asins'] = asin
    asin = asin.split(',')[0]
    cm = []
    cm.append((common.getString(30180 + cmmode) % common.getString(30166), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toggleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)))
    cm.append((common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30155) % common.getString(30166), 'XBMC.RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<shows>&title=<%s>)' % (sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(seriestitle))))
    common.addDir(seriestitle, mode, submode, infoLabels['Asins'], poster, fanart, infoLabels, cm=cm)
Beispiel #2
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2245')
     urls = re.compile('<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image in urls:
         if path.startswith("http://"):
             contentType,page = common.getData(path)
         else:
             contentType,page = common.getData(__BASE_URL__ + path)
         details = re.compile('class="w3" style="margin-left:288px;">(\s.*)<div>(.*?)</div>(\s.*)<div>(.+?)<').findall(page)
         if (len(details)) > 0:
             summary = details[0][3]
         else:
             summary = ''
         iconImage = image
         fanartImage = re.compile('class="vbox720x330" src="(.+?)" alt="(.*?)"').findall(page)
         if not fanartImage == None:
             try:
                 fanart = fanartImage[0][0]
                 title = fanartImage[0][1]
             except:
                 title = fanartImage
             urlMatch = re.compile('class="hd1 mrg_r1 none" style=""><a href="(.+?)"').findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType,title, __BASE_URL__ + urlMatch[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary, fanart)                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')        
Beispiel #3
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     print seriesBloc
     urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?itemtype="(.*?)".*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(baseUrl)
     for title, desc, type, url, img in urls:
         if type.endswith('Movie'):
             episodeNum = re.compile('/(\d.*)').findall(url)[0]
             contentType, page = common.getData('http://video2.walla.co.il/?w=null/null/' + episodeNum + '/@@/video/flv_pl')
             titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
             if (len(titleMatches)) == 1:
                 title = titleMatches[0][0]
                 images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
                 if (len(images)) >= 1:
                     iconImage = images[0]
                 details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
                 if (len(details)) > 0:
                     epiDetails = details[0]
         
                 timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
                 if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                     time = int(timeInSeconds[0]) / 60
                 else:
                     time = '00:00'
                 playPath = re.compile('<src>(.*?)</src>').findall(page)
                 length = len(playPath)
                 url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/WallaMediaPlayerAvod.swf tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://vod.walla.co.il' + url + ' playpath=' + playPath[length -1]
                 common.addLink('UTF-8', title, url, img, str(time), epiDetails)
         else:
             common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #4
0
def LIST_TVSHOWS_CATS():
    import tv as tvDB
    id = common.args.url
    if id:
        asins = tvDB.lookupTVdb(id,
                                rvalue='asins',
                                name='title',
                                tbl='categories')
        epidb = tvDB.lookupTVdb('',
                                name='asin',
                                rvalue='asin, seasonasin',
                                tbl='episodes',
                                single=False)
        if not asins: return
        for asin in asins.split(','):
            seasonasin = None
            for epidata in epidb:
                if asin in str(epidata):
                    seasonasin = epidata[1]
                    break
            if not seasonasin: seasonasin = asin
            for seasondata in tvDB.loadTVSeasonsdb(
                    seasonasin=seasonasin).fetchall():
                ADD_SEASON_ITEM(seasondata, disptitle=True)
        common.SetView('tvshows', 'seasonview')
        del epidb
    else:
        for title in tvDB.lookupTVdb('',
                                     name='asins',
                                     tbl='categories',
                                     single=False):
            if title:
                common.addDir(title[0], 'listtv', 'LIST_TVSHOWS_CATS',
                              title[0])
        xbmcplugin.endOfDirectory(pluginhandle, updateListing=False)
Beispiel #5
0
def BUILDMENU_KRYPTON():
    
    accept = 0
    Krypton = 0
    dialog = xbmcgui.Dialog()
    xbmc_version=xbmc.getInfoLabel("System.BuildVersion")
    version=float(xbmc_version[:4])

    if version >= 17.0 and version <= 17.9:
		accept = 1

    Krypton = 0
    dialog = xbmcgui.Dialog()

    try:
	    response = urllib2.urlopen(KryptonWiz)
    except:
	    Krypton = 1

    if accept == 1:	
		if Krypton == 0:
			link = Common.OPEN_URL(KryptonWiz).replace('\n','').replace('\r','')
			match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"').findall(link)
			for name,url,iconimage,fanart,description in match:
				Common.addDir(name,url,90,ART+name+'.png',ART+name+'.png',description)
		else:
			dialog.ok(AddonTitle,'Sorry we are unable to get the Krypton Build list at this time.','The Krypton host appears to be down.','[I][COLOR lightsteelblue]Plese try again later.[/COLOR][/I]')
    else:
    	dialog.ok(AddonTitle, "Sorry we are unable to process your request","[COLOR red][I][B]Error: You are not running Kodi Krypton[/COLOR][/I][/B]","[I]Your are running: [COLOR lightsteelblue][B]Kodi " + codename + " Version:[COLOR cyan] %s" % version + "[/COLOR][/I][/B][/COLOR]")
Beispiel #6
0
 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     episodes = re.compile('<div class="right item_small " style="">.*?<a href="(.*?)".*?</span><img src="(.*?)".*?<a.*?>(.*?)<').findall(main_page)
     for url, img, title in episodes:
         contentType,page = common.getData(__BASE_URL__ + url + '/@@/video/flv_pl')
         titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
         if (len(titleMatches)) == 1:
             title = titleMatches[0][0]
             images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
             if (len(images)) >= 1:
                 iconImage = images[0]
             details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
             if (len(details)) > 0:
                 epiDetails = details[0]
             
             timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
             if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                 time = int(timeInSeconds[0]) / 60
             else:
                 time = '00:00'
             url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://i.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?95 tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://walla.co.il/ playpath=' + re.compile('<src>(.*?)</src>').findall(page)[0]
             common.addLink(contentType,title, url, iconImage, str(time), epiDetails)
     nextPage = re.compile('<a class="in_blk p_r".*?href="(.*?)"').findall(main_page)
     if (len(nextPage)) > 0:
         common.addDir('UTF-8',__language__(30001), __BASE_URL__ + nextPage[0], self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png', __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #7
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     i = 1
     for item in seriesBloc:
         urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(item)
         for title, desc, url, img in urls:
             if i == 1:    
                 common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
             if i == 2:
                 episodeNum = re.compile('/(\d.*)').findall(url)[0]
                 contentType, page = common.getData('http://video2.walla.co.il/?w=null/null/' + episodeNum + '/@@/video/flv_pl')
                 titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
                 if (len(titleMatches)) == 1:
                     title = titleMatches[0][0]
                     images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
                     if (len(images)) >= 1:
                         iconImage = images[0]
                     details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
                     if (len(details)) > 0:
                         epiDetails = details[0]
             
                     timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
                     if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                         time = int(timeInSeconds[0]) / 60
                     else:
                         time = '00:00'
                     playPath = re.compile('<src>(.*?)</src>').findall(page)
                     length = len(playPath)
                     url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/WallaMediaPlayerAvod.swf tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://vod.walla.co.il' + url + ' playpath=' + playPath[length -1]
                     common.addLink(contentType,title, url, img, str(time), epiDetails)
         i=i+1
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #8
0
def SHOWCOMMUNITYBUILDS(url):

    link = Common.OPEN_URL(url).replace('\n', '').replace('\r', '')
    match = re.compile(
        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)"').findall(link)
    for name, url, iconimage, fanart in match:
        Common.addDir(name, url, 99, iconimage, fanart, " ")
Beispiel #9
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2225')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile('<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<').findall(url)
         for path, image, title in items:
             if (path.find('2224') != -1):
                 contentType,page = common.getData(path + '/@@/video/flv_pl')
                 titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
                 if (len(titleMatches)) == 1:
                     title = titleMatches[0][0]
                     details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
                     if (len(details)) > 0:
                         epiDetails = details[0]
                 
                     timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
                     if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                         time = int(timeInSeconds[0]) / 60
                     else:
                         time = '00:00'
                     url = 'rtmp://waflaWNE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?275 pageUrl=' + path + ' playpath=' + re.compile('<src>(.*?)</src>').findall(page)[1]
                     common.addLink(contentType,title, url, image, str(time), epiDetails)
             else:
                 if not path.startswith("http://"):
                     path = __BASE_URL__ + path
                 common.addDir(contentType,title, path, self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #10
0
    def getEpisodeList(self, url):
        contentType, page = common.getData(url)
        if url.find('page') == -1:
            featured = re.compile(
                '<a class="thumblink" href="(.+?)".*?src="(.+?)".*?alt="(.+?)"'
            ).findall(page)
            for url, image, title in featured:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType, title, url,
                                    self.MODES.PLAY_ITEM, image, __NAME__)

        items = re.compile(
            '<div class="entry-content-inside">.*?<a href="(.+?)" title="(.*?)".*?src="(.+?)"'
        ).findall(page)
        for url, title, image in items:
            if url.find('article') == -1:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType, title, url,
                                    self.MODES.PLAY_ITEM, image, __NAME__)

        hasNext = re.compile(
            'class=\'next page-numbers\' href=\'(.+?)\'').findall(page)
        if not hasNext == None and len(hasNext) > 0:
            # there is a next page
            url = hasNext[0]
            common.addDir('UTF-8', common.__language__(30001), url,
                          self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png',
                          __NAME__)
Beispiel #11
0
 def getCategories(self):
     categories = [
         ['/news/new-music/', 40001, self.MODES.GET_EPISODES_LIST],
         ['/music/mtv-playlist/', 40002, self.MODES.GET_SERIES_LIST],
         ['/charts/', 40003, self.MODES.GET_SERIES_LIST],
         ['/shows/browse/', 40004, self.MODES.GET_SERIES_LIST],
         ['/music/live-session/', 40005, self.MODES.GET_EPISODES_LIST]
     ]
     for item in categories:
         title = common.__language__(item[1])
         url = item[0]
         mode = item[2]
         iconImage = xbmc.translatePath(
             os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                          'icon_' + str(item[1]) + '.png'))
         if not os.path.exists(iconImage):
             iconImage = 'DefaultFolder.png'
         fanart = xbmc.translatePath(
             os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                          'fanart_' + str(item[1]) + '.png'))
         if not os.path.exists(fanart):
             fanart = 'DefaultFolder.png'
         common.addDir('UTF-8', title, __BASE_URL__ + url, mode, iconImage,
                       __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #12
0
 def getSeriesList(self):
     ## get all the series base url
     contentType, baseUrl = common.getData(__BASE_URL__ + '?w=/2222')
     urls = re.compile(
         '<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)" alt="(.+?)"'
     ).findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image, title in urls:
         if path.startswith("http://"):
             contentType, page = common.getData(path)
             url = path
         else:
             contentType, page = common.getData(__BASE_URL__ + path)
             url = __BASE_URL__ + path
         iconImage = image
         fanartImage = re.compile(
             'class="vbox720x330" src="(.+?)"').findall(page)
         if not fanartImage == None and len(fanartImage) > 0 and len(
                 fanartImage[0]) > 0:
             fanart = fanartImage[0]
         else:
             fanart = ''
         common.addDir(contentType, title, url,
                       self.MODES.GET_EPISODES_LIST, iconImage, __NAME__,
                       '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
def BACKUPMENU():

    Common.addItem('[COLOR cyan]Backup[/COLOR]','url',70,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Restore[/COLOR]','url',71,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Delete A Backup[/COLOR]','url',72,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Delete All Backups[/COLOR]','url',73,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Select Backup Location[/COLOR]','url',9,ICON,FANART,'')
Beispiel #14
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, urls = common.getMatches(
            __BASE_URL__, '<a id="opc".*?href="(.*?)">(.*?)<')
        ## for each series we get the series page to parse all the info from
        for path in urls:
            if path[0].startswith("http://"):
                contentType, page = common.getData(path[0])
            else:
                contentType, page = common.getData(__BASE_URL__ + path[0])
            title = path[1]
            imageMatch = re.compile(
                'class="stripe_title w7b white">(.*?)img\ssrc="(.*?)"'
            ).findall(page)
            details = re.compile('class="w3 nohvr">(.*?)<').findall(page)
            if (len(details)) > 0:
                summary = details[0]
            else:
                summary = ''
            if (len(imageMatch)) == 1:
                iconImage = common.getImage(imageMatch[0][1], __NAME__)
                urlMatch = re.compile(
                    'class="w6b fntclr2" href="(.*?)">').findall(page)
                if (len(urlMatch)) > 0:
                    common.addDir(contentType, title,
                                  __BASE_URL__ + urlMatch[0],
                                  self.MODES.GET_EPISODES_LIST, iconImage,
                                  __NAME__, summary)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #15
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, urls = common.getMatches(
            __BASE_URL__,
            '<a class="block w3 fldevt goldsep red bold" href="(.+?)" onclick="Evt\(this,(\d),&quot;(.+?)&quot;,3,&quot;folder_new_prakim_melaim'
        )
        ## for each series we get the series page to parse all the info from
        for path, num, title in urls:  ## num is not used and does nothing.
            if path.startswith("http://"):
                contentType, page = common.getData(path)
                url = path
            else:
                contentType, page = common.getData(__BASE_URL__ + path)
                url = __BASE_URL__ + path

            sumMatch = re.compile('class="w3">(.*?)<').findall(page)
            iconImage = re.compile('class="top_pic" src="(.+?)"').findall(page)
            fanart = xbmc.translatePath(
                os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                             'curtains.png'))
            if not iconImage == None and len(iconImage) > 0 and len(
                    iconImage[0]) > 0:
                iconImage = common.getImage(iconImage[0], __NAME__)
            else:
                iconImage = ''
            if (len(sumMatch)) == 1:
                summary = sumMatch[0]
                common.addDir(contentType, title, url,
                              self.MODES.GET_EPISODES_LIST, iconImage,
                              __NAME__, summary, fanart)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #16
0
def BACKUPMENU():

        Common.addItem('Backup','url',31,ART+'backuprestore.png',FANART,'')
        Common.addDir('Restore','url',32,ART+'backuprestore.png',FANART,'')
        Common.addDir('Delete A Backup','url',33,ART+'backuprestore.png',FANART,'')
        Common.addItem('Delete All Backups','url',34,ART+'backuprestore.png',FANART,'')
        Common.addItem('Select Backup Location','url',29,ART+'backuprestore.png',FANART,'')
def BUILDMENU_BETA():

    key = base64.b64encode(plugintools.get_setting("beta"))

    link = Common.OPEN_URL(BetaKeys).replace('\n', '').replace('\r', '')
    match = re.compile('passkey="(.+?)"').findall(link)
    for passkey in match:
        if key == passkey:
            link = Common.OPEN_URL(BetaWiz).replace('\n', '').replace('\r', '')
            match = re.compile(
                'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
            ).findall(link)
            for name, url, iconimage, fanart, description in match:
                Common.addDir(name, url, 90, ART + name + '.png',
                              ART + name + '.png', description)
        else:
            link = Common.OPEN_URL(BetaVIP).replace('\n', '').replace('\r', '')
            match = re.compile('passkey="(.+?)"').findall(link)
            for passkey in match:
                if key == passkey:
                    link = Common.OPEN_URL(BetaVIPWiz).replace('\n',
                                                               '').replace(
                                                                   '\r', '')
                    match = re.compile(
                        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
                    ).findall(link)
                    for name, url, iconimage, fanart, description in match:
                        Common.addDir(name, url, 90, ART + name + '.png',
                                      ART + name + '.png', description)
                else:
                    plugintools.message(
                        AddonTitle, "Invalid Key: Check Details",
                        "[COLOR yellow]https://www.facebook.com/groups/1735809796639007/"
                    )
Beispiel #18
0
def ListMenu():
    list_ = common.args.url
    common.addDir(common.getString(30104), 'appfeed', 'ListCont',
                  common.movielib % list_)
    common.addDir(common.getString(30107), 'appfeed', 'ListCont',
                  common.tvlib % list_)
    common.xbmcplugin.endOfDirectory(common.pluginhandle)
Beispiel #19
0
def LIST_TVSHOWS_CATS():
    import tv as tvDB
    catid = common.args.url
    if catid:
        asins = tvDB.lookupTVdb(catid, rvalue='asins', name='title', tbl='categories')
        epidb = tvDB.lookupTVdb('', name='asin', rvalue='asin, seasonasin', tbl='episodes', single=False)
        if not asins:
            return

        for asin in asins.split(','):
            seasonasin = None
            for epidata in epidb:
                if asin in str(epidata):
                    seasonasin = epidata[1]
                    break
            if not seasonasin:
                seasonasin = asin

            for seasondata in tvDB.loadTVSeasonsdb(seasonasin=seasonasin).fetchall():
                ADD_SEASON_ITEM(seasondata, disptitle=True)
        common.SetView('seasons', 'seasonview')
        del epidb
    else:
        for title in tvDB.lookupTVdb('', name='asins', tbl='categories', single=False):
            if title:
                common.addDir(title[0], 'listtv', 'LIST_TVSHOWS_CATS', title[0])

        xbmcplugin.endOfDirectory(pluginhandle, updateListing=False)
def BUILDMENU_KRYPTON():
    
    accept = 0
    Krypton = 0
    dialog = xbmcgui.Dialog()
    xbmc_version=xbmc.getInfoLabel("System.BuildVersion")
    version=float(xbmc_version[:4])

    if version >= 17.0 and version <= 17.9:
		accept = 1

    Krypton = 0
    dialog = xbmcgui.Dialog()

    try:
	    response = urllib2.urlopen(KryptonWiz)
    except:
	    Krypton = 1

    if accept == 1:	
		if Krypton == 0:
			link = Common.OPEN_URL(KryptonWiz).replace('\n','').replace('\r','')
			match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"').findall(link)
			for name,url,iconimage,fanart,description in match:
				Common.addDir(name,url,90,ART+name+'.png',ART+name+'.png',description)
		else:
			dialog.ok(AddonTitle,'Sorry we are unable to get the Krypton Build list at this time.','The Krypton host appears to be down.','[I][COLOR lightsteelblue]Plese try again later.[/COLOR][/I]')
    else:
    	dialog.ok(AddonTitle, "Sorry we are unable to process your request","[COLOR red][I][B]Error: You are not running Kodi Krypton[/COLOR][/I][/B]","[I]Your are running: [COLOR lightsteelblue][B]Kodi " + codename + " Version:[COLOR cyan] %s" % version + "[/COLOR][/I][/B][/COLOR]")
Beispiel #21
0
def BACKUPMENU():

    Common.addItem('[COLOR cyan]Backup[/COLOR]','url',70,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Restore[/COLOR]','url',71,ICON,FANART,'')
    Common.addDir('[COLOR cyan]Delete A Backup[/COLOR]','url',72,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Delete All Backups[/COLOR]','url',73,ICON,FANART,'')
    Common.addItem('[COLOR cyan]Select Backup Location[/COLOR]','url',9,ICON,FANART,'')
Beispiel #22
0
 def getSeriesList(self, genre):
     if genre == '100':
         ## handle movies
         categories={'7373':30007,'7396':30008, '7397':30009, '7367':30010}
         for url, titleNLS in categories.iteritems():
             title = common.__language__(titleNLS)
             iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + str(titleNLS) + '.png'))
             if not os.path.exists(iconImage):
                 iconImage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + str(titleNLS) + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('UTF-8',title, url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, '', fanart)
     else:
         ## get all the series that have full episodes
         contentType,matches = common.getMatches('http://yes.walla.co.il/?w=0/7701','id="(\d+)" href="" onclick="itemsFetchRows\(this.id,' + str(genre) + ',0\); return\(false\);">(.+?)<')                
         for url, name in matches:
             iconimage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + name + '.png'))
             if not os.path.exists(iconimage):
                 iconimage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + name + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('windows-1255', name, str(genre) + '/' + url, self.MODES.GET_EPISODES_LIST, iconimage, __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #23
0
def maintMenu():

	Common.addDir('[COLOR cyan]Auto Clean Device[/COLOR]','url',31,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Clear Cache[/COLOR]','url',1,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Delete Thumbnails[/COLOR]','url',2,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Purge Packages[/COLOR]','url',3,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Convert Physical Paths To Special[/COLOR]','url',13,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addDir('[COLOR cyan]SYSTEM RESET [/COLOR][COLOR red](CAUTION)[/COLOR]','url',6,ICON,FANART,'')
def maintMenu():

	Common.addDir('[COLOR cyan]Auto Clean Device[/COLOR]','url',31,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Clear Cache[/COLOR]','url',1,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Delete Thumbnails[/COLOR]','url',2,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Purge Packages[/COLOR]','url',3,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addItem('[COLOR cyan]Convert Physical Paths To Special[/COLOR]','url',13,os.path.join(ART, "icon.png"),ART+'maintwall.jpg','')
	Common.addDir('[COLOR cyan]SYSTEM RESET [/COLOR][COLOR red](CAUTION)[/COLOR]','url',6,ICON,FANART,'')
def COMMUNITY():

	link = Common.OPEN_URL(Community_List).replace('\n','').replace('\r','')
	match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)"').findall(link)
	for name,url,iconimage,fanart in match:
		Common.addDir("[COLOR cyan]" + name + " [/COLOR]",url,93,iconimage,fanart,'')
	
	Common.addItem('[COLOR white]HOW TO ADD YOUR BUILDS TO THE LIST![/COLOR]',BASEURL,17,ICON,FANART,'')
def COMMUNITY():

	link = Common.OPEN_URL(Community_List).replace('\n','').replace('\r','')
	match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)"').findall(link)
	for name,url,iconimage,fanart in match:
		Common.addDir("[COLOR cyan]" + name + " [/COLOR]",url,93,iconimage,fanart,'')
	
	Common.addItem('[COLOR white]HOW TO ADD YOUR BUILDS TO THE LIST![/COLOR]',BASEURL,17,ICON,FANART,'')
Beispiel #27
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(baseUrl)
     for title, desc, url, img in urls:
         common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #28
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(baseUrl)
     for title, desc, url, img in urls:
         common.addDir(contentType, title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #29
0
 def getVod(self, url):
     contentType, page = common.getData(url)
     features = re.findall(
         '<div class="topNav">(.*?)</div><span class="wcflow"', page)
     if features and len(features) > 0:
         menu = re.findall('href="(.*?)">(.*?)<', features[0])
         for href, name in menu:
             common.addDir(contentType, name, __BASE_URL__ + href,
                           self.MODES.GET_EPISODES_LIST,
                           "DefaultFolder.png", __NAME__)
Beispiel #30
0
def BUILDMENU():

    link = Common.OPEN_URL(wizard_rel).replace('\n', '').replace('\r', '')
    match = re.compile(
        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
    ).findall(link)
    for name, url, iconimage, fanart, description in match:
        Common.addDir(
            name + " [COLOR gold]Ver:[/COLOR] [COLOR lime]" + description +
            "[/COLOR]", url, 11, iconimage, fanart, description)
Beispiel #31
0
def BACKUPMENU():

    Common.addItem('Backup', 'url', 31, ART + 'backuprestore.png', FANART, '')
    Common.addDir('Restore', 'url', 32, ART + 'backuprestore.png', FANART, '')
    Common.addDir('Delete A Backup', 'url', 33, ART + 'backuprestore.png',
                  FANART, '')
    Common.addItem('Delete All Backups', 'url', 34, ART + 'backuprestore.png',
                   FANART, '')
    Common.addItem('Select Backup Location', 'url', 29,
                   ART + 'backuprestore.png', FANART, '')
def LIST_MOVIE_TYPES(type=False):
    import movies as moviesDB
    if not type:
        type = common.args.url
    if type:
        mode = 'LIST_MOVIES_FILTERED'
    for item in moviesDB.getMovieTypes(type):
        common.addDir(item, 'listmovie', mode, type)
    xbmcplugin.addSortMethod(common.pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(common.pluginhandle, updateListing=False)
def ADVANCEDSETTINGS():

    link = Common.OPEN_URL(AdvancedSettings).replace('\n',
                                                     '').replace('\r', '')
    match = re.compile(
        'name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?ersion="(.+?)"'
    ).findall(link)
    for name, url, iconimage, fanart, description in match:
        Common.addDir('[COLOR cyan]' + name + '[/COLOR]', url, 90, ICON,
                      FANART, description)
Beispiel #34
0
def INDEX():

  #if plugintools.get_setting("username")=="":
  #       settings(params)
		 
  #login_request =  login(LoginServer  , plugintools.get_setting("username") , plugintools.get_setting("password") )

  #if login_request!="ACCESS GRANTED":	

	Common.addDir('[COLOR cyan]INSTALADOR DE JOGOS[/COLOR]  ' + AdvancedSettingsMain,BASEURL,30,ICON,FANART,'')
Beispiel #35
0
def LIST_MOVIE_TYPES(type=False):
    import movies as moviesDB
    if not type:
        type = common.args.url
    if type:
        mode = 'LIST_MOVIES_FILTERED'
    for item in moviesDB.getMovieTypes(type):
        common.addDir(item, 'listmovie', mode, type)
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(pluginhandle, updateListing=False)
Beispiel #36
0
def LIST_TVSHOWS_TYPES(type=False):
    import tv as tvDB
    if not type:
        type = common.args.url
    if type:
        mode = 'LIST_TVSHOWS_FILTERED'
        items = tvDB.getShowTypes(type)
    for item in items:
        common.addDir(item,'listtv',mode,type)
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)          
    xbmcplugin.endOfDirectory(pluginhandle,updateListing=False)   
Beispiel #37
0
def LIST_TVSHOWS_TYPES(type=False):
    import tv as tvDB
    if not type:
        type = common.args.url
    if type:
        mode = 'LIST_TVSHOWS_FILTERED'
        items = tvDB.getShowTypes(type)
    for item in items:
        common.addDir(item, 'listtv', mode, type)
    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
    xbmcplugin.endOfDirectory(pluginhandle, updateListing=False)
Beispiel #38
0
def ADD_SEASON_ITEM(seasondata, mode='listtv', submode='LIST_EPISODES_DB', disptitle=False, cmmode=0, onlyinfo=False, export=False):
    asin, seriesASIN, season, seriestitle, plot, actors, network, mpaa, genres, premiered, year, stars, votes, \
        episodetotal, audio, empty, empty, isHD, isprime, empty, poster, banner, fanart, forceupd = seasondata
    fanart, cover = getFanart(seriesASIN) if showfanart else None
    infoLabels = {'Title': seriestitle,
                  'TVShowTitle': seriestitle,
                  'Plot': plot,
                  'mediatype': 'season',
                  'MPAA': mpaa,
                  'Cast': actors.split(',') if actors else [],
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Episode': episodetotal,
                  'Season': season,
                  'Studio': network,
                  'AudioChannels': audio,
                  'TotalSeasons': 1,
                  'Thumb': poster,
                  'Fanart': fanart,
                  'Asins': asin
                  }

    asin = asin.split(',')[0]
    displayname = seriestitle + ' - ' if disptitle else ''

    if season != 0 and season < 99:
        displayname += common.getString(30167) + ' ' + str(season)
    elif season > 1900:
        displayname += common.getString(30168) + str(season)
    elif season > 99:
        displayname += common.getString(30167) + ' ' + str(season).replace('0', '.')
    else:
        displayname += common.getString(30169)

    if export:
        xbmclibrary.EXPORT_SEASON(asin)
        return

    cm = [(common.getString(30180 + cmmode) % common.getString(30167),
          'RunPlugin(%s?mode=<common>&sitemode=<toogleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)),
          (common.getString(30185) % common.getString(30167),
          'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_SEASON>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30186), 'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]),
          (common.getString(30155) % common.getString(30167), 'RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<seasons>&title=<%s>)' % (
           sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(displayname)))]

    if onlyinfo:
        return infoLabels
    else:
        common.addDir(displayname, mode, submode, infoLabels['Asins'], poster, fanart, infoLabels, cm=cm)
Beispiel #39
0
def LIST_MOVIES_CATS():
    import movies as moviesDB
    id = common.args.url
    if id:
        asins = moviesDB.lookupMoviedb(id, rvalue='asins', name='title', table='categories')
        for asin in asins.split(','):
            LIST_MOVIES('asin',asin,search=True)
        common.SetView('movies', 'movieview')
    else:
        for title in moviesDB.lookupMoviedb('', name='asins', table='categories', single=False):
            if title: common.addDir(title[0],'listmovie','LIST_MOVIES_CATS',title[0])
        xbmcplugin.endOfDirectory(pluginhandle,updateListing=False)   
Beispiel #40
0
def ADD_SEASON_ITEM(seasondata, mode='listtv', submode='LIST_EPISODES_DB', disptitle=False, cmmode=0, onlyinfo=False, export=False):
    asin,seriesASIN,season,seriestitle,plot,actors,network,mpaa,genres,premiered,year,stars,votes,episodetotal,audio,empty,empty,isHD,isprime,empty,poster,banner,fanart = seasondata
    infoLabels={'Title': seriestitle,'TVShowTitle':seriestitle}
    if plot:
        infoLabels['Plot'] = plot
    if mpaa:
        infoLabels['MPAA'] = mpaa
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if year:
        infoLabels['Year'] = year
    if premiered:
        infoLabels['Premiered'] = premiered
    if stars:
        infoLabels['Rating'] = stars           
    if votes:
        infoLabels['Votes'] = votes  
    if genres:
        infoLabels['Genre'] = genres 
    if episodetotal:
        infoLabels['Episode'] = episodetotal
    if season:
        infoLabels['Season'] = season
    if network:
        infoLabels['Studio'] = network
    if audio:
        infoLabels['AudioChannels'] = audio
    displayname = ''
    if disptitle: displayname = seriestitle + ' - '
    if season != 0 and len(str(season)) < 3: displayname += common.getString(30167, True) + ' ' + str(season)
    elif len(str(season)) > 2: displayname += common.getString(30168, True) + str(season)
    else: displayname += common.getString(30169, True)
    if not fanart or common.na:
        fanart = poster
    if showfanart == 'true': 
        fanart, cover = getFanart(seriesASIN)
    infoLabels['TotalSeasons'] = 1
    infoLabels['Thumb'] = poster
    infoLabels['Fanart'] = fanart
    infoLabels['Asins'] = asin
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_SEASON(asin)
        return
    cm = []
    cm.append((common.getString(30180+cmmode) % common.getString(30167), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<%s>&asin=<%s>)' % (sys.argv[0], watch_mode[cmmode], asin)))
    cm.append((common.getString(30185) % common.getString(30167), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_SEASON>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30186), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]))
    cm.append((common.getString(30155) % common.getString(30167), 'XBMC.RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<seasons>&title=<%s>)' % ( sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(displayname))))
    if onlyinfo:
        return infoLabels
    else:
        common.addDir(displayname,mode,submode,infoLabels['Asins'],poster,fanart,infoLabels,isHD=isHD,cm=cm)
Beispiel #41
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2161')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile('<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<').findall(url)
         for path, image, title in items:
             if not path.startswith("http://"):
                 path = __BASE_URL__ + path
             common.addDir(contentType,title, path, self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #42
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2162')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile('<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<').findall(url)
         for path, image, title in items:
             if not path.startswith("http://"):
                 path = __BASE_URL__ + path
             common.addDir(contentType,title, path, self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Beispiel #43
0
def INDEX():

    #if plugintools.get_setting("username")=="":
    #       settings(params)

    #login_request =  login(LoginServer  , plugintools.get_setting("username") , plugintools.get_setting("password") )

    #if login_request!="ACCESS GRANTED":

    Common.addDir(
        '[COLOR cyan]INSTALADOR DE JOGOS[/COLOR]  ' + AdvancedSettingsMain,
        BASEURL, 30, ICON, FANART, '')
Beispiel #44
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__)
     urls = re.compile('class="opc".*?href="(.*?)".*?w3b">(.*?)<.*?src="(.*?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, title, img in urls:
         if path.startswith("http://"):
             url = path
         else:
             url = __BASE_URL__ + path
         common.addDir(contentType, title, url, self.MODES.GET_CHAPTERS, img, __NAME__)
                                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #45
0
 def getGenere(self, url):
     ## get all the series base url
     contentType, page = common.getData(url)
     genreBloc = re.compile('<nav class="sideNav".*?</nav>').findall(page)        
     genres = re.compile('<li.*?href="(.*?)".*?"text">(.*?)<').findall(genreBloc[0])
     i = 1
     for url, title in genres:
         if i > 1:
             common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_SERIES_LIST, 'DefaultFolder.png', __NAME__)
         i = i + 1
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(503)")
Beispiel #46
0
 def getCategories(self):
     categories={'1':30003,'2':30004, '4':30005, '100':30006}
     for genre, titleNLS in categories.iteritems():
         title = common.__language__(titleNLS)
         iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + str(titleNLS) + '.png'))
         if not os.path.exists(iconImage):
             iconImage = 'DefaultFolder.png'
         fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + str(titleNLS) + '.png'))
         if not os.path.exists(fanart):
             fanart = 'DefaultFolder.png'
         common.addDir('UTF-8',title,genre,self.MODES.GET_SERIES_LIST,iconImage,__NAME__,'', fanart)
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #47
0
 def getGenere(self, url):
     ## get all the series base url
     contentType, page = common.getData(url)
     genreBloc = re.compile('<nav class="sideNav".*?</nav>').findall(page)        
     genres = re.compile('<li.*?href="(.*?)".*?"text">(.*?)<').findall(genreBloc[0])
     i = 1
     for url, title in genres:
         if i > 1:
             common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_SERIES_LIST, 'DefaultFolder.png', __NAME__)
         i = i + 1
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(503)")
Beispiel #48
0
def ADD_SHOW_ITEM(showdata,
                  mode='listtv',
                  submode='LIST_TV_SEASONS',
                  cmmode=0):
    asin, seriestitle, plot, network, mpaa, genres, actors, premiered, year, stars, votes, seasontotal, episodetotal, audio, isHD, isprime, empty, empty, empty, poster, banner, fanart = showdata
    infoLabels = {
        'Title': seriestitle,
        'Plot': plot,
        'mediatype': "tvshow",
        'MPAA': mpaa,
        'Cast': actors.split(',') if actors else None,
        'Year': year,
        'Premiered': premiered,
        'Rating': stars,
        'Votes': votes,
        'Genre': genres,
        'Episode': episodetotal,
        'TotalSeasons': seasontotal,
        'Studio': network,
        'AudioChannels': audio
    }
    infoLabels = {k: v for k, v in infoLabels.items() if v}
    submode = 'LIST_TV_SEASONS' if mode == 'listtv' else submode
    poster = '' if not poster else poster
    infoLabels['Thumb'] = poster
    infoLabels['Fanart'] = fanart
    infoLabels['Asins'] = asin
    asin = asin.split(',')[0]
    cm = []
    cm.append((
        common.getString(30180 + cmmode) % common.getString(30166),
        'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toggleWatchlist>&asin=<%s>&remove=<%s>)'
        % (sys.argv[0], asin, cmmode)))
    cm.append((common.getString(
        30183
    ), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)'
               % (sys.argv[0], asin)))
    cm.append((
        common.getString(30155) % common.getString(30166),
        'XBMC.RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<shows>&title=<%s>)'
        % (sys.argv[0], urllib.quote_plus(
            infoLabels['Asins']), urllib.quote_plus(seriestitle))))
    common.addDir(seriestitle,
                  mode,
                  submode,
                  infoLabels['Asins'],
                  poster,
                  fanart,
                  infoLabels,
                  cm=cm)
Beispiel #49
0
def INDEX():
    Common.addDir('Install Builds', BASEURL, 10, ART + 'install.png', FANART,
                  '')
    Common.addDir('Backup | Restore', BASEURL, 30, ART + 'backuprestore.png',
                  FANART, '')
    Common.addDir('Maintenance', BASEURL, 20, ART + 'clean.png', FANART, '')
    Common.addDir('Tools', BASEURL, 40, ART + 'tool.png', FANART, '')
Beispiel #50
0
 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     # check for seasons
     seasonsList = re.compile('<div class="drop".*?</div>').findall(main_page)
     if len(seasonsList) > 0:
         # we have seasons
         seasons = re.compile('<li>.*?href="(.*?)".*?</li>').findall(seasonsList[0])
         i = 1
         for season in seasons:
             common.addDir('UTF-8', __language__(30011) + ' ' + str(i), __BASE_URL__ + season, self.MODES.SHOW_EPISODES, '', __NAME__) 
             i = i + 1
     else:
         # we don't go directly to episodes
         self.showEpisodes(url)
Beispiel #51
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,urls = common.getMatches(__BASE_URL__,'<a id="opc" href="(.*?)"')
     ## for each series we get the series page to parse all the info from
     for path in urls:
         contentType,page = common.getData(__BASE_URL__ + path)
         titleMatches = re.compile('class="stripe_title w7b white">\s*(.*?)\s*</h1>\s*<img src="(.*?)"').findall(page)
         if len(titleMatches) == 0:
             # try a different possibility
             titleMatches = re.compile('class="stripe_title w7b white">.*?>(.*?)<.*?src="(.*?)"').findall(page)
         details = re.compile('class="w3 nohvr" style="line-height:17px;">(.*?)<').findall(page)
         if (len(details)) > 0:
             summary = details[0]
         else:
             summary = ''
         if (len(titleMatches)) == 1:
             title = titleMatches[0][0]
             iconImage = common.getImage(titleMatches[0][1],__NAME__)
             urlMatch = re.compile('class="w6b" href="(.*?)">').findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType,title, __BASE_URL__ + urlMatch[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)
     common.addDir(contentType,"ספיישל דייגו בספארי לבקשת הורי הפורום", __BASE_URL__ +'?w=//2562538', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     common.addDir(contentType,"דייגו מציל את חיות הים --מיוחד לאבות מסורים", __BASE_URL__ +'?w=//2545366', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     common.addDir(contentType,"הרפתקאות דורה ודייגו", __BASE_URL__ +'?w=//2505725', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #52
0
def ADD_SHOW_ITEM(showdata,mode='listtv',submode='LIST_TV_SEASONS',cmmode=0,onlyinfo=False,export=False):
    asin,seriestitle,plot,network,mpaa,genres,actors,premiered,year,stars,votes,seasontotal,episodetotal,audio,isHD,isprime,empty,empty,empty,poster,banner,fanart = showdata
    infoLabels={'Title': seriestitle,'TVShowTitle':seriestitle}
    if plot:
        infoLabels['Plot'] = plot
    if mpaa:
        infoLabels['MPAA'] = mpaa
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if year:
        infoLabels['Year'] = year
    if premiered:
        infoLabels['Premiered'] = premiered
    if stars:
        infoLabels['Rating'] = stars           
    if votes:
        infoLabels['Votes'] = votes  
    if genres:
        infoLabels['Genre'] = genres 
    if episodetotal:
        infoLabels['Episode'] = episodetotal
    if seasontotal:
        infoLabels['TotalSeasons'] = seasontotal
    if network:
        infoLabels['Studio'] = network
    if audio:
        infoLabels['AudioChannels'] = audio
    if mode == 'listtv':
        submode = 'LIST_TV_SEASONS'
    if poster is None:
        poster=''
    if not fanart or fanart == common.na:
        fanart = poster
    infoLabels['Thumb'] = poster
    infoLabels['Fanart'] = fanart
    infoLabels['Asins'] = asin
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_SHOW(asin)
        return
    cm = []
    cm.append((common.getString(30180+cmmode) % common.getString(30166), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<%s>&asin=<%s>)' % (sys.argv[0], watch_mode[cmmode], asin)))
    cm.append((common.getString(30185) % common.getString(30166), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_SHOW>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30186), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]))
    cm.append((common.getString(30155) % common.getString(30166), 'XBMC.RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<shows>&title=<%s>)' % ( sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(seriestitle))))
    if onlyinfo:
        return infoLabels
    else:
        common.addDir(seriestitle,mode,submode,infoLabels['Asins'],poster,fanart,infoLabels,isHD=isHD,cm=cm)
Beispiel #53
0
def CATEGORIES():
    if KODIVERSION >= 18.0:
        WIZARDURL = "http://sergiogracas.com/emular/kodi/tema.txt"
    elif KODIVERSION >= 17.0:
        WIZARDURL = "http://sergiogracas.com/emular/kodi/tema.txt"
    elif KODIVERSION >= 16.0:
        WIZARDURL = "http://sergiogracas.com/emular/kodi/tema.txt"
    else:
        WIZARDURL = "http://sergiogracas.com/emular/kodi/tema.txt"    
    
    link = common.OPEN_URL(WIZARDURL).replace('\n','').replace('\r','')
    match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
    for name,url,iconimage,fanart,description in match:
        common.addDir(name,url,1,iconimage,fanart,description)
    setView('movies', 'MAIN')
Beispiel #54
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, baseUrl = common.getData(__BASE_URL__)
        urls = re.compile(
            'class="opc".*?href="(.*?)".*?w3b">(.*?)<.*?src="(.*?)"').findall(
                baseUrl)
        ## for each series we get the series page to parse all the info from
        for path, title, img in urls:
            if path.startswith("http://"):
                url = path
            else:
                url = __BASE_URL__ + path
            common.addDir(contentType, title, url, self.MODES.GET_CHAPTERS,
                          img, __NAME__)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #55
0
 def getSeriesList(self, genre):
     if genre == '100':
         ## handle movies
         categories = {
             '7373': 30007,
             '7396': 30008,
             '7397': 30009,
             '7367': 30010
         }
         for url, titleNLS in categories.iteritems():
             title = common.__language__(titleNLS)
             iconImage = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                              'icon_' + str(titleNLS) + '.png'))
             if not os.path.exists(iconImage):
                 iconImage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                              'fanart_' + str(titleNLS) + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('UTF-8', title, url,
                           self.MODES.GET_EPISODES_LIST, iconImage,
                           __NAME__, '', fanart)
     else:
         ## get all the series that have full episodes
         contentType, matches = common.getMatches(
             'http://yes.walla.co.il/?w=0/7701',
             'id="(\d+)" href="" onclick="itemsFetchRows\(this.id,' +
             str(genre) + ',0\); return\(false\);">(.+?)<')
         for url, name in matches:
             iconimage = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                              'icon_' + name + '.png'))
             if not os.path.exists(iconimage):
                 iconimage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                              'fanart_' + name + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('windows-1255', name,
                           str(genre) + '/' + url,
                           self.MODES.GET_EPISODES_LIST, iconimage,
                           __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #56
0
 def getCategories(self):
     categories = [['/news/new-music/',40001,self.MODES.GET_EPISODES_LIST], 
                   ['/music/mtv-playlist/',40002,self.MODES.GET_SERIES_LIST],
                   ['/charts/',40003,self.MODES.GET_SERIES_LIST],
                   ['/shows/browse/',40004,self.MODES.GET_SERIES_LIST],
                   ['/music/live-session/',40005,self.MODES.GET_EPISODES_LIST]]
     for item in categories:
         title = common.__language__(item[1])
         url = item[0]
         mode = item[2]
         iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + str(item[1]) + '.png'))
         if not os.path.exists(iconImage):
             iconImage = 'DefaultFolder.png'
         fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + str(item[1]) + '.png'))
         if not os.path.exists(fanart):
             fanart = 'DefaultFolder.png'
         common.addDir('UTF-8',title, __BASE_URL__ + url, mode, iconImage, __NAME__, '', fanart)   
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Beispiel #57
0
def ADD_SHOW_ITEM(showdata, mode='listtv', submode='LIST_TV_SEASONS', cmmode=0, onlyinfo=False, export=False):
    asin, seriestitle, plot, network, mpaa, genres, actors, premiered, year, stars, votes, seasontotal, episodetotal, \
        audio, isHD, isprime, empty, empty, empty, poster, banner, fanart = showdata
    submode = 'LIST_TV_SEASONS' if mode == 'listtv' else submode
    poster = '' if not poster else poster
    infoLabels = {'Title': seriestitle,
                  'Plot': plot,
                  'mediatype': 'tvshow',
                  'MPAA': mpaa,
                  'Cast': actors.split(',') if actors else [],
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Episode': episodetotal,
                  'TotalSeasons': seasontotal,
                  'Studio': network,
                  'AudioChannels': audio,
                  'Thumb': poster,
                  'Fanart': fanart,
                  'Asins': asin
                  }
    asin = asin.split(',')[0]

    if export:
        xbmclibrary.EXPORT_SHOW(asin)
        return

    cm = [(common.getString(30180 + cmmode) % common.getString(30166),
           'RunPlugin(%s?mode=<common>&sitemode=<toogleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)),
          (common.getString(30185) % common.getString(30166),
          'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_SHOW>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30186), 'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]),
          (common.getString(30155) % common.getString(30166), 'RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<shows>&title=<%s>)' % (
           sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(seriestitle)))]

    if onlyinfo:
        return infoLabels
    else:
        common.addDir(seriestitle, mode, submode, infoLabels['Asins'], poster, fanart, infoLabels, cm=cm)
Beispiel #58
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2227')
     urls = re.compile('<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)" alt="(.+?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image, title in urls:
         if path.startswith("http://"):
             contentType,page = common.getData(path)
             url = path
         else:
             contentType,page = common.getData(__BASE_URL__ + path)
             url = __BASE_URL__ + path
         iconImage = image
         fanartImage = re.compile('</div><img src="(.+?)" width="940"').findall(page)
         if not fanartImage == None and len(fanartImage) > 0 and len(fanartImage[0]) > 0:
             fanart = fanartImage[0]
         else:
             fanart = ''
         common.addDir(contentType,title, url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, '', fanart)                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')        
Beispiel #59
0
    def getEpisodeList(self, url):
        contentType,page = common.getData(url)
        if url.find('page') == -1:
            featured = re.compile('<a class="thumblink" href="(.+?)".*?src="(.+?)".*?alt="(.+?)"').findall(page)
            for url, image, title in featured:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType,title, url, self.MODES.PLAY_ITEM, image, __NAME__)

        items = re.compile('<div class="entry-content-inside">.*?<a href="(.+?)" title="(.*?)".*?src="(.+?)"').findall(page)
        for url, title, image in items:                
            if url.find('article') == -1:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType,title, url, self.MODES.PLAY_ITEM, image, __NAME__)

        hasNext = re.compile('class=\'next page-numbers\' href=\'(.+?)\'').findall(page)
        if not hasNext == None and len(hasNext) > 0:
            # there is a next page
            url = hasNext[0]
            common.addDir('UTF-8',common.__language__(30001), url, self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png', __NAME__)
Beispiel #60
0
def ADD_SEASON_ITEM(seasondata, mode='listtv', submode='LIST_EPISODES_DB', disptitle=False, cmmode=0):
    asin, seriesASIN, season, seriestitle, plot, actors, network, mpaa, genres, premiered, year, stars, votes, episodetotal, audio, empty, empty, isHD, isprime, empty, poster, banner, fanart = seasondata
    infoLabels = {'Title': seriestitle,
                  'TVShowTitle': seriestitle,
                  'Plot': plot,
                  'mediatype': "season",
                  'MPAA': mpaa,
                  'Cast': actors.split(',') if actors else None,
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Episode': episodetotal,
                  'Season': season,
                  'Studio': network,
                  'AudioChannels': audio,
                  'TotalSeasons': 1
                  }
    infoLabels = {k: v for k, v in infoLabels.items() if v}
    displayname = ''
    if disptitle:
        displayname = seriestitle + ' - '
    if season != 0 and len(str(season)) < 3:
        displayname += common.getString(30167, True) + ' ' + str(season)
    elif len(str(season)) > 2:
        displayname += common.getString(30168, True) + str(season)
    else:
        displayname += common.getString(30169, True)
    if showfanart:
        fanart, cover = getFanart(seriesASIN)
    infoLabels['Thumb'] = poster
    infoLabels['Fanart'] = fanart
    infoLabels['Asins'] = asin
    asin = asin.split(',')[0]
    cm = []
    cm.append((common.getString(30180 + cmmode) % common.getString(30167), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toggleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)))
    cm.append((common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30155) % common.getString(30167), 'XBMC.RunPlugin(%s?mode=<tv>&sitemode=<delfromTVdb>&asins=<%s>&table=<seasons>&title=<%s>)' % (sys.argv[0], urllib.quote_plus(infoLabels['Asins']), urllib.quote_plus(displayname))))
    common.addDir(displayname, mode, submode, infoLabels['Asins'], poster, fanart, infoLabels, cm=cm)