def getCriticker(): apikey = settings.getSetting('criticker_apikey') if len(apikey) < 5: common.Notification('Error', 'Please set up Criticker key in settings') settings.openSettings() return url = 'http://api.criticker.com/handler.php?CritickerKey=%%API_KEY%%&Function=RecommendFilm' url = url.replace("%%API_KEY%%", apikey) print url req = urllib2.Request(url) req.add_header( 'User-Agent', "%s %s" % (sys.modules["__main__"].__plugin__, sys.modules["__main__"].__version__)) response = urllib2.urlopen(req) dom = parse(response) try: title = dom.getElementsByTagName("FilmName")[0].firstChild.data year = dom.getElementsByTagName("FilmYear")[0].firstChild.data avgtier = dom.getElementsByTagName("AvgTier")[0].firstChild.data except: common.Notification('Error', 'Please check your Criticker key in settings') settings.openSettings() return s = '{0} ({1}) r:{2}'.format(title, year, avgtier) common.createMovieListItem(s, title, year) url = sys.argv[0] + '?action=' common.createListItem('Another', True, url + 'criticker') common.endofDir() return
def displayLists(type): genres = None if type == 'Movie': genres = ['Action','Adventure','Animation','Comedy','Crime', 'Documentary','Drama','Family','Fantasy','Film Noir','History', 'Horror','Indie','Music','Musical','Mystery','No Genre','Romance', 'Science Fiction','Sport','Suspense','Thriller','War','Western'] url = sys.argv[0]+'?action=trakt_getList&user=cloudberry&slug=movie-' #genres = traktlib.getMovieGenres() #genres = traktlib.getListsFromTrakt() #url = sys.argv[0]+'?action=trakt_RecommendedMovies&genre=' #url = sys.argv[0]+'?action=trakt_getList&user=cloudberry&slug=' elif type == 'Show' : genres = ['Action','Adventure','Animation','Children', 'Comedy','Documentary','Drama','Fantasy', 'Game Show','Home and Garden','Mini Series', 'News','No Genre','Reality','Science Fiction', 'Soap','Special Interest','Sport','Talk Show', 'Western'] #genres = traktlib.getShowGenres() #url = sys.argv[0]+'?action=trakt_RecommendedShows&genre=' url = sys.argv[0]+'?action=trakt_getList&user=cloudberry&slug=show-' for genre in genres: #traktlib.createListTrakt(genre, type) common.createListItem(genre, True, url + genre.lower().replace(' ', '-')) #for genre in genres: # common.createListItem(genre['name'], True, url+genre['slug']) common.endofDir()
def SearchDialog(type,title,year,season,number,go=False): if go: updateDialog = xbmcgui.DialogProgress() updateDialog.create("Furk Library", "Searching") updateDialog.update(20, "searching", title) oneclick = settings.getSetting("oneclick") if type == 'Show': search = searcherLib.ShowSearch(title, season, number, oneclick) else: search = searcherLib.MovieSearch(title, year, oneclick) if len(search.qualities) < 2 and search.oneClickSatisfied == False and search.mediatype=='Show': common.Notification('Furk Library 2', 'making a deep search') search.deepsearch() if search.oneclick: if search.oneClickSatisfied: common.Notification('Furk Library 2', 'found one click') return search.best_quality_result.dir['name'],search.best_quality_result.mediaUrl() elif search.best_quality_result: common.Notification('Furk Library 2', 'one click not found playing nearest') quality_select = 0 else: pass #see what are our options if search.valids > 1 : dialog = xbmcgui.Dialog() if go: #list items as list item for myresult in search.results: common.createListItem(myresult.text, False, myresult.mediaUrl()) common.endofDir() else: quality_select = dialog.select('Select quality', search.quality_options()) elif search.valids == 1: common.Notification('Found only:',search.results[0].text.split(' ',1)[0]) quality_select = 0
def getImdbAwards(type,year): if type == 'Oscars': url = 'http://www.imdb.com/event/ev0000003/{0}'.format(year) elif type == 'Cannes': url = 'http://www.imdb.com/event/ev0000147/{0}'.format(year) response = urllib2.urlopen(url) html = response.read() soup = BeautifulSoup(html) #print soup.prettify() winners = soup.findAll('h2') movies = dict() for winner in winners: category = winner.text try: h3 = winner.findNextSibling('blockquote').h3 except: continue winnerdiv = h3.findNextSibling('div') link = winnerdiv.find(href=re.compile("/title/tt(\d{7})/")) imdb_number = re.match(r'/title/tt(\d{7})/',link.get('href')).group(1) if not imdb_number in movies.keys(): movie = common.getMovieInfobyImdbid(imdb_number) if movie: movies[imdb_number] = movie else: movies[imdb_number] = None else: movie= movies[imdb_number] common.createListItem(category, False, '',len(winners)*2) if movie: common.createMovieListItemTrakt(movie,len(winners)*2) else: common.createListItem(imdb_number, False, '',len(winners)*2) common.endofDir() return
def getCriticker(): apikey = settings.getSetting('criticker_apikey') if len(apikey) < 5 : common.Notification ('Error','Please set up Criticker key in settings') settings.openSettings() return url = 'http://api.criticker.com/handler.php?CritickerKey=%%API_KEY%%&Function=RecommendFilm' url = url.replace("%%API_KEY%%",apikey) print url req = urllib2.Request(url) req.add_header('User-Agent', "%s %s" % (sys.modules[ "__main__" ].__plugin__, sys.modules[ "__main__" ].__version__)) response = urllib2.urlopen(req) dom = parse(response) try: title = dom.getElementsByTagName("FilmName")[0].firstChild.data year = dom.getElementsByTagName("FilmYear")[0].firstChild.data avgtier = dom.getElementsByTagName("AvgTier")[0].firstChild.data except: common.Notification ('Error','Please check your Criticker key in settings') settings.openSettings() return s= '{0} ({1}) r:{2}'.format(title,year,avgtier) common.createMovieListItem(s,title,year) url = sys.argv[0]+'?action=' common.createListItem('Another',True, url + 'criticker') common.endofDir() return
def ListFiles(id): files = furklib.fileInfo(id) for f in files: myname = f['name'] myurl = f['url_dl'] common.createListItem(myname, False, myurl) common.endofDir() return
def displayRottenMenu(): url = sys.argv[0]+'?action=rotten_common' results = traktJsonRequest('GET', 'http://api.rottentomatoes.com/api/public/v1.0/lists/dvds.json?apikey=cn6g7mzgatbfaxvza35nyjf8') print results links = results['links'] for link in links: linktxt = getCamelCase(link).replace('_',' ') common.createListItem(linktxt, True, url+'&url='+links[link]) common.endofDir()
def displayGenres(type): if type == 'Movie': genres = traktlib.getMovieGenres() url = sys.argv[0]+'?action=trakt_RecommendedMovies&genre=' elif type == 'Show' : genres = traktlib.getShowGenres() url = sys.argv[0]+'?action=trakt_RecommendedShows&genre=' for genre in genres: common.createListItem(genre['name'], True, url+genre['slug']) common.endofDir()
def getMyFiles(): dirs = furklib.myFiles() for dir in dirs: if dir['is_ready']=='0': continue id = dir['info_hash'] dirname = dir['name'] url = sys.argv[0]+'?action=listFiles&id='+id common.createListItem(dirname, True, url) common.endofDir() return
def SearchFromMenu(query): dirs = furklib.searchFurk(query) for dir in dirs: if dir['is_ready'] == '0': continue id = dir['info_hash'] dirname = dir['name'] url = sys.argv[0] + '?action=listFiles&id=' + id common.createListItem(dirname, True, url) common.endofDir() return
def SearchFromMenu(query): dirs = furklib.searchFurk(query) for dir in dirs: if dir['is_ready']=='0': continue id = dir['info_hash'] dirname = dir['name'] url = sys.argv[0]+'?action=listFiles&id='+id common.createListItem(dirname, True, url) common.endofDir() return
def getMyFiles(): dirs = furklib.myFiles() for dir in dirs: if dir['is_ready'] == '0': continue id = dir['info_hash'] dirname = dir['name'] url = sys.argv[0] + '?action=listFiles&id=' + id common.createListItem(dirname, True, url) common.endofDir() return
def displayAdultGenres(): genres = [ "Amateur","Anal","Asian","Ass","BBW","Big Dicks","Big T**s","Blondes", "B*****b","Bondage","Brunette","Cumshot","Deep Throat", "Fetish","Fisting","G******g","Gay","Handjob","Hardcore","Hentai", "Interracial","Lesbian","Masturbation","Mature","MILF","Pornstars", "Sex Toys","Shemale","Squirting","Striptease","Teens","Threesome","Tranny"] url = sys.argv[0]+'?action=trakt_SearchCache&query=' for genre in genres: common.createListItem(genre, True, url+genre) common.endofDir()
def displayMovieLensmenu(): url = sys.argv[0]+'?action=movielensUrl&url=' url1 = url + urllib.quote("http://movielens.org/") name1 = 'A' url2 = url + urllib.quote("http://movielens.org/") name2 = 'Your Wishlist' url3 = url + urllib.quote("http://movielens.org/") name3 = 'New DVDs' urls = [] urls.append ((url1,name1)) urls.append ((url2,name2)) urls.append ((url3,name3)) for myurl,myname in urls: common.createListItem(myname, True, myurl) common.endofDir() return
def displayMovieLensmenu(): url = sys.argv[0] + '?action=movielensUrl&url=' url1 = url + urllib.quote("http://movielens.org/") name1 = 'A' url2 = url + urllib.quote("http://movielens.org/") name2 = 'Your Wishlist' url3 = url + urllib.quote("http://movielens.org/") name3 = 'New DVDs' urls = [] urls.append((url1, name1)) urls.append((url2, name2)) urls.append((url3, name3)) for myurl, myname in urls: common.createListItem(myname, True, myurl) common.endofDir() return
def getImdbtop250(page): response = urllib2.urlopen('http://www.imdb.com/chart/top') html = response.read() entries = re.findall(r'<tr bgcolor="#(?:e5e5e5|ffffff)" valign="top"><td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"><b>(\d{1,3})\.</b></font></td><td align="center"><font face="Arial, Helvetica, sans-serif" size="-1">(\d\.\d)</font></td><td><font face="Arial, Helvetica, sans-serif" size="-1"><a href="/title/tt(\d{7})/">([^<]+)</a> \((\d{4})\)</font></td><td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">(\d{1,3}(?:,\d{3})*)</font></td></tr>', html) page = int(page) first = page-1 pagesize = 25 for entry in entries[first*pagesize:page*pagesize]: number, score, link_number, title, year, votes = entry s= '#{0}: {1} r:{2}'.format(number,'{0}',score) common.createMovieListItemfromimdbid(link_number,pagesize,s) url = sys.argv[0]+'?action=imdbTop250&page=' + str(page+1) if page*pagesize < 250: common.createListItem('Next ' + str(pagesize),True, url ) common.endofDir() return
def ListFiles(id): files = furklib.fileInfo(id) if not files: download(id) return for f in files: if not f.has_key('url_dl'): download(id) return myname = f['name'] myurl = f['url_dl'] common.createListItem(myname, False, myurl) common.endofDir() return
def getMyFiles(): dirs = furklib.myFiles() if dirs: for dir in dirs: if dir['is_ready']=='0': continue id = dir['info_hash'] dirname = dir['name'] url = sys.argv[0]+'?action=listFiles&id='+id #if dir['av_result'] == 'ok' and dir['is_ready'] == '1': # common.createListItem('[COLOR green]' + dirname + '[/COLOR]', True, url) #elif dir['av_result'] == 'error': # common.createListItem('[COLOR red]' + dirname + '[/COLOR]', True, url) #else: common.createListItem(common.CleanFileName(dirname), True, url) common.endofDir() return
def AddonMenu(): #homescreen print 'FurkLibrary menu' url = sys.argv[0] + '?action=music_' #common.createListItem(params['content_type'],True,url + 'myFiles') common.createListItem('Search', True, url + 'search') common.createListItem('My Files', True, url + 'myFiles') common.createListItem('Setup', False, url + 'setup') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def AddonMenu(): #homescreen print 'FurkLibrary menu' url = sys.argv[0]+'?action=music_' #common.createListItem(params['content_type'],True,url + 'myFiles') common.createListItem('Search',True,url + 'search') common.createListItem('My Files',True,url + 'myFiles') common.createListItem('Setup',False,url +'setup') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def displayIMDBMenu(): url = sys.argv[0]+'?action=' common.createListItem("Top 250", True, url+'imdb_Top250&page=1') common.createListItem("Top Rentals", True, url+'imdb_TopRentals') types = [ 'Oscars' , 'Cannes' ] for type in types: for year in reversed(xrange(2000,2013)): common.createListItem(type + ' ' + str(year)+' (Beta)', True, url+'imdb_Awards&type={0}&year={1}'.format(type,year)) common.endofDir() return
def displayTraktMenu(): url = sys.argv[0]+'?action=' common.createListItem('Search in Furk cache', True, url+'search') common.createListItem('My Furk files', True, url+'myFiles') common.createListItem('Search Movie', True, url+'trakt_SearchMovies') common.createListItem('Search TV Show', True, url+'trakt_SearchShows') #common.createListItem('Recommended Movies', True, url+'trakt_MovieGenres') common.createListItem('Trending Movies', True, url +'trakt_TrendingMovies') #common.createListItem('Recommended TV Shows', True, url +'trakt_ShowGenres') common.createListItem('Trending TV Shows', True, url +'trakt_TrendingShows') common.createListItem('Movies', True, url +'trakt_ShowLists&user=cloudberry&type=Movie') common.createListItem('TV Shows', True, url +'trakt_ShowLists&user=cloudberry&type=Show') common.createListItem('Featured', True, url +'trakt_getList&user=cloudberry&slug=movie-featured') common.createListItem('Most Popular', True, url +'trakt_getList&user=cloudberry&slug=movie-most-popular') common.createListItem('Highly rated', True, url +'trakt_getList&user=cloudberry&slug=movie-highly-rated') common.createListItem('Featured', True, url +'trakt_getList&user=cloudberry&slug=show-featured') common.createListItem('Most Popular', True, url +'trakt_getList&user=cloudberry&slug=show-most-popular') common.createListItem('Highly rated', True, url +'trakt_getList&user=cloudberry&slug=show-highly-rated') if settings.getSetting('adult_menu') == 'true': common.createListItem('Adult', True, url +'trakt_ShowAdultLists') common.createListItem('IMDB Top 250', True, url +'trakt_getList&user=mmounirou&slug=imdb-best-250-movies') common.createListItem('Movies of 2013', True, url +'trakt_getList&user=BenFranklin&slug=movies-of-2013') common.endofDir()
def traktAction(params): if(params['action'] == 'trakt_Menu'): displayTraktMenu() elif(params['action'] == 'trakt_SearchMovies'): # Search keyboard = xbmc.Keyboard('', 'Search') keyboard.doModal() if keyboard.isConfirmed(): query = keyboard.getText() movies = traktlib.getMovieInfobySearch(unicode(query)) for movie in movies: common.createMovieListItemTrakt(movie,totalItems = len(movies)) common.endofDir() elif(params['action'] == 'trakt_SearchShows'): # Search keyboard = xbmc.Keyboard('', 'Search') keyboard.doModal() if keyboard.isConfirmed(): query = keyboard.getText() shows = traktlib.getShowInfobySearch(unicode(query)) for show in shows: common.createShowListItemTrakt(show,totalItems = len(shows)) common.endofDir() elif(params['action'] == 'trakt_SeenRate'): imdbid = params['imdbid'] traktSeenRate(imdbid) elif(params['action'] == 'trakt_DismissMovie'): imdbid = params['imdbid'] traktDismissMovie(imdbid) elif(params['action'] == 'trakt_MovieGenres'): displayGenres(type='Movie') elif(params['action'] == 'trakt_ShowGenres'): displayGenres(type='Show') elif(params['action'] == 'trakt_RecommendedShows'): try: genre = params['genre'] except: genre = None if genre: displayRecommendedShows(genre) else : url = sys.argv[0]+'?action=trakt_ShowGenres' common.createListItem('Filter by Genre', True, url) displayRecommendedShows(genre) elif(params['action'] == 'trakt_listfeeds'): myfeeds = furklib.myFeeds()['feeds'] myfeeds = sorted(myfeeds,key=lambda feed: feed['name']) url = sys.argv[0]+'?action=trakt_addfeeds' common.createListItem('Add Feeds from trakt', True, url) for feed in myfeeds: url = sys.argv[0]+'?action=trakt_MovieGenres' common.createListItem(feed['name'], True, url) common.endofDir() elif(params['action'] == 'trakt_addfeeds'): myfeeds = furklib.myFeeds()['feeds'] shows = traktlib.getWatchlistShowsfromTrakt() progress = traktlib.getProgress() series = [] for current in progress: series.append(current['show']) shows = shows + series for show in shows: check = [feed for feed in myfeeds if feed['name'] == show['title']] if len(check)==0: furklib.addFeed(show['title']) url = sys.argv[0]+'?action=trakt_MovieGenres' common.createListItem(show['title'], False, '') common.endofDir() elif(params['action'] == 'trakt_RecommendedMovies'): try: genre = params['genre'] except: genre = None if genre: displayRecommendedMovies(genre) else : url = sys.argv[0]+'?action=trakt_MovieGenres' common.createListItem('Filter by Genre', True, url) displayRecommendedMovies(genre) elif(params['action'] == 'trakt_AddShowtoWatchlist'): tvdbid = params['tvdbid'] addShowtoWatchlist(tvdbid) elif(params['action'] == 'trakt_AddMovietoWatchlist'): imdbid = params['imdbid'] addMovietoWatchlist(imdbid) elif(params['action'] == 'trakt_RemoveMoviefromWatchlist'): imdbid = params['imdbid'] response = traktlib.removeMoviefromWatchlist(imdbid) common.traktResponse(response) elif(params['action'] == 'trakt_DismissShow'): tvdbid = params['tvdbid'] traktDismissShow(tvdbid) elif(params['action'] == 'trakt_SetShowSeen'): tvdbid = params['tvdbid'] try: season = params['season'] episode = params['episode'] except: season = 100 episode = 100 response = traktSeenShow(tvdbid,season,episode) elif(params['action'] == 'trakt_TrendingMovies'): movies = traktlib.getTrendingMoviesFromTrakt() for movie in movies: common.createMovieListItemTrakt(movie,totalItems = len(movies)) common.endofDir() elif(params['action'] == 'trakt_TrendingShows'): shows = traktlib.getTrendingShowsFromTrakt() progressShows = calculateProgress() for show in shows: if show['title'] in progressShows: common.createShowListItemTrakt(show,len(shows),progressShows[show['title']][0],progressShows[show['title']][1]) else: common.createShowListItemTrakt(show,totalItems = len(shows)) common.endofDir() elif(params['action'] == 'trakt_Progress'): displayProgress() elif(params['action'] == 'trakt_getList'): user=params['user'] slug=params['slug'] displayList(user,slug) else: common.Notification('Action Not found:' , params['action'])
def displayTraktMenu(): url = sys.argv[0]+'?action=' common.createListItem('--------------FEEDS------------------', False, '') common.createListItem('List my feeds', True, url+'trakt_listfeeds') common.createListItem('--------------MOVIES------------------', False, '') common.createListItem('Recommended Movies', True, url+'trakt_RecommendedMovies') common.createListItem('Trending Movies', True, url +'trakt_TrendingMovies') common.createListItem('Search Movies', True, url +'trakt_SearchMovies') common.createListItem('--------------SHOWS-----------------------', False, '') common.createListItem('Tv Show Progress', True, url+'trakt_Progress') common.createListItem('Recommended Shows', True, url +'trakt_RecommendedShows') common.createListItem('Trending Shows', True, url +'trakt_TrendingShows') common.createListItem('Search Shows', True, url +'trakt_SearchShows') common.createListItem('---------------LISTS----------------------', False, '') common.createListItem('Academy Award For Best Picture by chrisu', True, url +'trakt_getList&user=chrisu&slug=academy-award-for-best-picture') common.createListItem('James Bond 007 Collection by ltfearme', True, url +'trakt_getList&user=ltfearme&slug=james-bond-007-collection') #http://trakt.tv/user/ltfearme/lists/james-bond-007-collection common.createListItem('ALL IMDB Top 250 Movies Ever by totopsgr', True, url +'trakt_getList&user=totopsgr&slug=all-imdb-top-250-movies-ever') #http://trakt.tv/user/totopsgr/lists/all-imdb-top-250-movies-ever common.createListItem('Best Mindfucks by BenFranklin', True, url +'trakt_getList&user=BenFranklin&slug=best-mindfucks') #http://trakt.tv/user/BenFranklin/lists/best-mindfucks common.createListItem('Studio Ghibli Feature-films by Draackje', True, url +'trakt_getList&user=Draackje&slug=studio-ghibli-feature-films') #http://trakt.tv/user/Draackje/lists/studio-ghibli-feature-films common.createListItem('Criterion Collection by gubarenko', True, url +'trakt_getList&user=gubarenko&slug=criterion-collection') #http://trakt.tv/user/gubarenko/lists/criterion-collection common.endofDir()
def ShowMenu(): #homescreen print 'Streamcub TV show menu' url = sys.argv[0]+'?action=' common.createListItem('Search TV Show', True, url+'trakt_SearchShows') common.createListItem('Genres', True, url +'trakt_ShowGenres') common.createListItem('Featured', True, url +'trakt_Shows&name=featured') common.createListItem('Most Popular', True, url +'trakt_Shows&name=trending') common.createListItem('Highly Rated', True, url +'trakt_Shows&name=top_rated') common.createListItem('Airing This Week', True, url +'trakt_Shows&name=on_the_air') common.createListItem('Airing Today', True, url +'trakt_Shows&name=airing_today') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def AddonMenu(): #homescreen print 'FurkLibrary menu' url = sys.argv[0]+'?action=' #common.createListItem(params['content_type'],True,url + 'myFiles') common.createListItem('My Files',True,url + 'myFiles') common.createListItem('Search',True,url + 'search') common.createListItem('Trakt',True,url + 'trakt_Menu') common.createListItem('Trailers',False,url + 'Trailers') common.createListItem('Rotten Tomatoes',True,url + 'rotten_Menu') common.createListItem('Add watchlist to your library',False,url + 'traktlib') common.createListItem('VCDQ New Releases',True, url + 'vcdq') #common.createListItem('MovieLens',True, url + 'movielens') common.createListItem('IMDB',True, url + 'imdb_Menu&page=1') common.createListItem('Torrentfreak Top 10',True, url + 'torrentfreak') common.createListItem('Criticker (Beta)',True, url + 'criticker') common.createListItem('Setup',False,url +'setup') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def AddonMenu(): #homescreen print 'FurkLibrary menu' url = sys.argv[0] + '?action=' #common.createListItem(params['content_type'],True,url + 'myFiles') common.createListItem('My Files', True, url + 'myFiles') common.createListItem('Search', True, url + 'search') common.createListItem('Trakt', True, url + 'trakt_Menu') common.createListItem('Trailers', False, url + 'Trailers') common.createListItem('Rotten Tomatoes', True, url + 'rotten_Menu') common.createListItem('Add watchlist to your library', False, url + 'traktlib') common.createListItem('VCDQ New Releases', True, url + 'vcdq') #common.createListItem('MovieLens',True, url + 'movielens') common.createListItem('IMDB', True, url + 'imdb_Menu&page=1') common.createListItem('Torrentfreak Top 10', True, url + 'torrentfreak') common.createListItem('Criticker (Beta)', True, url + 'criticker') common.createListItem('Setup', False, url + 'setup') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def AddonMenu(): #homescreen print 'Streamcub menu' url = sys.argv[0]+'?action=' #common.createListItem(params['content_type'],True,url + 'myFiles') #params['action'] = 'trakt_Menu' #trakt.traktAction(params) common.createListItem('Movies', True, url +'MovieMenu') common.createListItem('TV Shows', True, url +'ShowMenu') if settings.getSetting('adult_menu') == 'true': common.createListItem('Adult', True, url +'trakt_ShowAdultLists') common.createListItem('My Files',True,url + 'myFiles') #common.createListItem('Live TV',True,url + 'LiveTVMenu') common.createListItem('Search all torrents', True, url+'search') common.createListItem('Setup',False,url +'setup') common.createListItem('Account usage', True, url+'accountUsage') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def MovieMenu(): #homescreen print 'Streamcub Movie menu' url = sys.argv[0]+'?action=' common.createListItem('Search Movie', True, url+'trakt_SearchMovies') common.createListItem('Genres', True, url +'trakt_MovieGenres') common.createListItem('Most Popular', True, url +'trakt_Movies&name=trending') #common.createListItem('Playing in theaters', True, url +'trakt_Movies&name=now_playing') common.createListItem('Highly rated', True, url +'trakt_Movies&name=top_rated') common.createListItem('Featured', True, url +'trakt_Movies&name=featured') common.createListItem('Revenue', True, url +'trakt_Movies&name=revenue') #common.createListItem('Upcoming', True, url +'trakt_Movies&name=upcoming') xbmcplugin.endOfDirectory(int(sys.argv[1]))