本文整理汇总了Python中quodlibet.util.collection.Playlist.remove_songs方法的典型用法代码示例。如果您正苦于以下问题:Python Playlist.remove_songs方法的具体用法?Python Playlist.remove_songs怎么用?Python Playlist.remove_songs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quodlibet.util.collection.Playlist
的用法示例。
在下文中一共展示了Playlist.remove_songs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_updating_aggregates_remove_songs
# 需要导入模块: from quodlibet.util.collection import Playlist [as 别名]
# 或者: from quodlibet.util.collection.Playlist import remove_songs [as 别名]
def test_updating_aggregates_remove_songs(s):
pl = Playlist(s.temp, "playlist")
pl.extend(NUMERIC_SONGS)
s.failUnless(pl.get("~#length"))
pl.remove_songs(NUMERIC_SONGS)
s.failIf(pl.get("~#length"))
示例2: test_masked_handling
# 需要导入模块: from quodlibet.util.collection import Playlist [as 别名]
# 或者: from quodlibet.util.collection.Playlist import remove_songs [as 别名]
def test_masked_handling(self):
if os.name == "nt":
# FIXME: masking isn't properly implemented on Windows
return
# playlists can contain songs and paths for masked handling..
lib = FileLibrary("foobar")
pl = Playlist(self.temp, "playlist", lib)
song = Fakesong({"date": "2038", "~filename": fsnative(u"/fake")})
song.sanitize()
lib.add([song])
# mask and update
lib.mask("/")
pl.append(song)
pl.remove_songs([song])
self.failUnless("/fake" in pl)
pl.extend(self.TWO_SONGS)
# check if collections can handle the mix
self.failUnlessEqual(pl("date"), "2038")
# unmask and update
lib.unmask("/")
pl.add_songs(["/fake"], lib)
self.failUnless(song in pl)
pl.delete()
lib.destroy()