本文整理汇总了Python中lollypop.cache.InfoCache.uncache方法的典型用法代码示例。如果您正苦于以下问题:Python InfoCache.uncache方法的具体用法?Python InfoCache.uncache怎么用?Python InfoCache.uncache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lollypop.cache.InfoCache
的用法示例。
在下文中一共展示了InfoCache.uncache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _on_search_activated
# 需要导入模块: from lollypop.cache import InfoCache [as 别名]
# 或者: from lollypop.cache.InfoCache import uncache [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.uncache(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_btn_release
# 需要导入模块: from lollypop.cache import InfoCache [as 别名]
# 或者: from lollypop.cache.InfoCache import uncache [as 别名]
def _on_btn_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.uncache(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)