Esempio n. 1
0
 def __on_search_activated(self, action, variant, artist):
     """
         Switch to page
         @param action as SimpleAction
         @param variant as GVariant
         @param artist as str
     """
     InfoCache.remove(artist, 'wikipedia')
     InfoContent.clear(self)
     self.set_visible_child_name('spinner')
     self._spinner.start()
     t = Thread(target=self.__load_page_content, args=(artist,))
     t.daemon = True
     t.start()
Esempio n. 2
0
 def __on_search_activated(self, action, variant, artist):
     """
         Switch to page
         @param action as SimpleAction
         @param variant as GVariant
         @param artist as str
     """
     InfoCache.remove(artist, 'wikipedia')
     InfoContent.clear(self)
     self.set_visible_child_name('spinner')
     self._spinner.start()
     t = Thread(target=self.__load_page_content, args=(artist,))
     t.daemon = True
     t.start()
Esempio n. 3
0
 def _on_button_release(self, widget, event):
     """
         Reload current view if autoload unchanged
         @param widget as Gtk.Widget
         @param event as Gdk.Event
     """
     if self.__timeout_id is not None:
         GLib.source_remove(self.__timeout_id)
         self.__timeout_id = None
         visible_name = self.__stack.get_visible_child_name()
         # Clear cache if needed
         if visible_name in ['lastfm', 'wikipedia']:
             for artist in self.__current_track.artists:
                 InfoCache.remove(artist, visible_name)
             # stack -> scrolled -> viewport -> grid
             self._on_child_unmap(
                   self.__stack.get_visible_child().get_child().get_child())
         self.__on_current_changed(Lp().player)
Esempio n. 4
0
 def _on_button_release(self, widget, event):
     """
         Reload current view if autoload unchanged
         @param widget as Gtk.Widget
         @param event as Gdk.Event
     """
     if self.__timeout_id is not None:
         GLib.source_remove(self.__timeout_id)
         self.__timeout_id = None
         visible_name = self.__stack.get_visible_child_name()
         # Clear cache if needed
         if visible_name in ['lastfm', 'wikipedia']:
             for artist in self.__current_track.artists:
                 InfoCache.remove(artist, visible_name)
             # stack -> scrolled -> viewport -> grid
             self._on_child_unmap(
                 self.__stack.get_visible_child().get_child().get_child())
         self.__on_current_changed(Lp().player)