def __setup_menu(self, artist, album): """ Setup menu for artist @param artist as str @param album as str """ wp = Wikipedia() result = wp.search(artist) result += wp.search(artist + ' ' + album) cleaned = list(set(result)) if artist in cleaned: cleaned.remove(artist) GLib.idle_add(self.__setup_menu_strings, cleaned)
def _setup_menu(self, artists, album): """ Setup menu for artist @param artists as str @param album as str """ if artists == self._artists: wp = Wikipedia() result = wp.search(artists) result += wp.search(artists + ' ' + album) cleaned = list(set(result)) if artists in cleaned: cleaned.remove(artists) GLib.idle_add(self._setup_menu_strings, cleaned)
def _setup_menu(self, artist): """ Setup menu for artist @param artist as str """ if artist == self._artist: wp = Wikipedia() result = wp.search(artist) if artist in result: result.remove(artist) GLib.idle_add(self._setup_menu_strings, result)