本文整理汇总了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)