def MainMenu(): logged_in = account.authenticate() is_prime = account.is_prime() oc = ObjectContainer() if logged_in: if is_prime: oc.add( DirectoryObject(key=Callback(BrowseMenu, video_type="movies"), title="Browse Movies")) oc.add( DirectoryObject(key=Callback(BrowseMenu, video_type="tv"), title="Browse TV")) oc.add(DirectoryObject(key=Callback(LibraryMenu), title="Your Library")) if is_prime: oc.add( DirectoryObject(key=Callback(WatchlistMenu), title="Your Watchlist")) oc.add( DirectoryObject(key=Callback(SearchMenu), title="Search", thumb=R(PLUGIN_ICON_SEARCH))) oc.add(PrefsObject(title="Preferences")) return oc
def MainMenu(): logged_in = account.authenticate() is_prime = account.is_prime() oc = ObjectContainer() if logged_in: if is_prime: oc.add(DirectoryObject(key=Callback(BrowseMenu, video_type="movies"), title="Browse Movies")) oc.add(DirectoryObject(key=Callback(BrowseMenu, video_type="tv"), title="Browse TV")) oc.add(DirectoryObject(key=Callback(LibraryMenu), title="Your Library")) if is_prime: oc.add(DirectoryObject(key=Callback(WatchlistMenu), title="Your Watchlist")) oc.add(DirectoryObject(key=Callback(SearchMenu), title="Search", thumb=R(PLUGIN_ICON_SEARCH))) oc.add(PrefsObject(title="Preferences")) return oc
def MainMenu(): oc = ObjectContainer(no_cache=True) logged_in = account.logged_in() if not logged_in: logged_in = account.authenticate() if logged_in: is_prime = account.is_prime() if is_prime: oc.add(DirectoryObject(key=Callback(BrowseMenu, browse_type="movie"), title="Browse Movies")) oc.add(DirectoryObject(key=Callback(BrowseMenu, browse_type="tv"), title="Browse TV Shows")) oc.add(DirectoryObject(key=Callback(BrowseMenu, is_library=True), title="Your Library")) if is_prime: oc.add(DirectoryObject(key=Callback(BrowseMenu, is_watchlist=True), title="Your Watchlist")) oc.add(SearchDirectoryObject(title="Search", prompt="Search for a Movie or TV Show")) oc.add(PrefsObject(title="Preferences")) return oc