本文整理汇总了Python中library.MediaDB.remove方法的典型用法代码示例。如果您正苦于以下问题:Python MediaDB.remove方法的具体用法?Python MediaDB.remove怎么用?Python MediaDB.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类library.MediaDB
的用法示例。
在下文中一共展示了MediaDB.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: real_remove_item
# 需要导入模块: from library import MediaDB [as 别名]
# 或者: from library.MediaDB import remove [as 别名]
def real_remove_item(self, item, fully=False):
songs = self.get_item_songs(item)
MediaDB.remove(songs)
if fully:
try:
[ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
except: pass
示例2: remove_songs
# 需要导入模块: from library import MediaDB [as 别名]
# 或者: from library.MediaDB import remove [as 别名]
def remove_songs(self, fully=False):
if len(self.select_rows) > 0:
songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
MediaDB.remove(songs)
if fully:
[ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
self.delete_select_items()
return True
示例3: job
# 需要导入模块: from library import MediaDB [as 别名]
# 或者: from library.MediaDB import remove [as 别名]
def job(self):
songs = MediaDB.get_songs("local")
total = len(songs)
i = 0
for song in songs:
i += 1
if not song.exists():
MediaDB.remove(song)
yield "Check deleted files %d/%s" % (i,total), float(i)/float(total), False
示例4: move_to_trash
# 需要导入模块: from library import MediaDB [as 别名]
# 或者: from library.MediaDB import remove [as 别名]
def move_to_trash(self):
flag = False
if len(self.select_rows) > 0:
songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
if self.highlight_item and self.highlight_item.get_song() in songs:
Player.stop()
self.highlight_item = None
flag = True
MediaDB.remove(songs)
[ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue"]
self.delete_select_items()
if flag:
Player.next()
return True