本文整理汇总了Python中quodlibet.util.cover.manager.CoverManager.acquire_cover_sync方法的典型用法代码示例。如果您正苦于以下问题:Python CoverManager.acquire_cover_sync方法的具体用法?Python CoverManager.acquire_cover_sync怎么用?Python CoverManager.acquire_cover_sync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quodlibet.util.cover.manager.CoverManager
的用法示例。
在下文中一共展示了CoverManager.acquire_cover_sync方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_acquire_cover_sync
# 需要导入模块: from quodlibet.util.cover.manager import CoverManager [as 别名]
# 或者: from quodlibet.util.cover.manager.CoverManager import acquire_cover_sync [as 别名]
def test_acquire_cover_sync(self):
song = AudioFile({"~filename": "/dev/null"})
manager = CoverManager(use_built_in=False)
handler = manager.plugin_handler
for source in dummy_sources:
handler.plugin_handle(source)
handler.plugin_enable(dummy_sources[0])
self.assertIs(manager.acquire_cover_sync(song), None)
handler.plugin_enable(dummy_sources[1])
self.assertIs(manager.acquire_cover_sync(song), DUMMY_COVER)
handler.plugin_enable(dummy_sources[2])
self.assertIs(manager.acquire_cover_sync(song), DUMMY_COVER)
handler.plugin_disable(dummy_sources[1])
self.assertIs(manager.acquire_cover_sync(song), None)