def searchDialogClosed(self, what, searchContext = None): print "[YTB] searchDialogClosed: ", what if what == SEARCH: dlg = self.session.openWithCallback(self.youTubeListScreenClosed, YouTubeListScreen) dlg.searchFeed(searchContext) elif what == CANCEL: interface.close() elif what == STDFEEDS: self.openStandardFeeds() else: if what == PLAYLISTS: callback = self.openPlaylists elif what == FAVORITES: callback = self.openFavorites if not interface.isLoggedIn(): self.session.openWithCallback(callback, YouTubeUserListScreen, youTubeUserConfig.getDefaultUser()) else: callback(YouTubeUserListScreen.LOGIN_SUCCESS)
def addToPlaylist(self): if not interface.isLoggedIn(): self.login(self.addToPlaylistLogin) else: self.addToPlaylistReal()
def removeFromFavorites(self): if not interface.isLoggedIn(): self.login(self.removeFromFavoritesLogin) else: self.removeFromFavoritesReal()
def removeFromPlaylist(self): if not interface.isLoggedIn(): self.login(self.removeFromPlaylistLogin) else: self.removeFromPlaylistReal()
def addToFavorites(self): if not interface.isLoggedIn(): self.login(self.addToFavoritesLogin) else: self.addToFavoritesReal()