Commits

Rhys ! committed 2c08b02

sidebar only autosearches once for each song

  • Participants
  • Parent commits 288560f

Comments (0)

Files changed (1)

 
         self.shell = shell
         self.visible = False
+        self.last_looked_for = None
         self.c_song = CurrentSong(db)
         
         buttons = self.prep_buttons()
         if playing_entry:
             self.song_changed(playing_entry)
 
+    def get_lyrics(self):
+        self.last_looked_for = self.c_song.entry
+        return super(self.__class__, self).get_lyrics()
+
     def song_changed(self, entry):
         self.discard.props.sensitive = True
         self.c_song.refresh(entry)
         else:
             self.shell.add_widget(self.vbox, rb.SHELL_UI_LOCATION_RIGHT_SIDEBAR, expand=True)
             self.visible = True
-            if self.c_song.entry:
+            if self.c_song.entry not in [None, self.last_looked_for]:
                 self.get_lyrics()
 
     def destroy(self):