def do_activate(self): shell = self.object sp = shell.props.shell_player self.db = shell.get_property('db') self.qm = RB.RhythmDBQueryModel.new_empty(self.db) self.pec_id = sp.connect('playing-song-changed', self.playing_entry_changed) self.pc_id = sp.connect('playing-changed', self.playing_changed) self.sc_id = sp.connect('playing-source-changed', self.source_changed) self.current_entry = None self.entry_type = RB.RhythmDBEntryType() playlist_group = RB.DisplayPageGroup.get_by_id("playlists") self.echonest_source = GObject.new(EchoNestSource, entry_type=self.entry_type, shell=shell, pixbuf=None, plugin=self) shell.register_entry_type_for_source(self.echonest_source, self.entry_type) shell.append_display_page(self.echonest_source, playlist_group) self.lookup_query_model = self.echonest_source.props.query_model glade_file = self.find_file("source.glade") gconf = GConf.Client.get_default() self.echonest_source.initialize_ui(glade_file, gconf) # a mapping of a url to similar artist data from that url. # similar artist data is a mapping of sanitized_artist -> artist self.similar_artists_obj = SimilarArtists() self.initialize_icon()