本文整理匯總了Python中lollypop.cache.InfoCache.remove方法的典型用法代碼示例。如果您正苦於以下問題:Python InfoCache.remove方法的具體用法?Python InfoCache.remove怎麽用?Python InfoCache.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類lollypop.cache.InfoCache
的用法示例。
在下文中一共展示了InfoCache.remove方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __on_search_activated
# 需要導入模塊: from lollypop.cache import InfoCache [as 別名]
# 或者: from lollypop.cache.InfoCache import remove [as 別名]
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()
示例2: _on_button_release
# 需要導入模塊: from lollypop.cache import InfoCache [as 別名]
# 或者: from lollypop.cache.InfoCache import remove [as 別名]
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)