本文整理汇总了Python中api.NetEase.fm_trash方法的典型用法代码示例。如果您正苦于以下问题:Python NetEase.fm_trash方法的具体用法?Python NetEase.fm_trash怎么用?Python NetEase.fm_trash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.NetEase
的用法示例。
在下文中一共展示了NetEase.fm_trash方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from api import NetEase [as 别名]
# 或者: from api.NetEase import fm_trash [as 别名]
#.........这里部分代码省略.........
# 播放上一曲
elif key == ord('['):
if len(self.storage.database["player_info"]["player_list"]) == 0:
continue
self.player.prev()
time.sleep(0.1)
# 增加音量
elif key == ord('='):
self.player.volume_up()
# 减少音量
elif key == ord('-'):
self.player.volume_down()
# 随机播放
elif key == ord('?'):
if len(self.storage.database["player_info"]["player_list"]) == 0:
continue
self.player.shuffle()
time.sleep(0.1)
# 喜爱
elif key == ord(','):
self.netease.fm_like(self.player.get_playing_id())
# 删除FM
elif key == ord('.'):
if self.datatype == 'fmsongs':
if len(self.storage.database["player_info"]["player_list"]) == 0:
continue
self.player.next()
self.netease.fm_trash(self.player.get_playing_id())
time.sleep(0.1)
# 下一FM
elif key == ord('/'):
if self.datatype == 'fmsongs':
if len(self.storage.database["player_info"]["player_list"]) == 0:
continue
self.player.next()
time.sleep(0.1)
# 播放、暂停
elif key == ord(' '):
# If not open a new playing list, just play and pause.
try:
if self.datalist[idx] == self.storage.database["songs"][str(self.player.playing_id)]:
self.player.play_and_pause(self.storage.database['player_info']['idx'])
time.sleep(0.1)
continue
except:
pass
# If change to a new playing list. Add playing list and play.
if datatype == 'songs':
self.resume_play = False
self.player.new_player_list('songs', self.title, self.datalist, -1)
self.player.end_callback = None
self.player.play_and_pause(idx)
self.at_playing_list = True
elif datatype == 'djchannels':
self.resume_play = False
self.player.new_player_list('djchannels', self.title, self.datalist, -1)
self.player.end_callback = None
self.player.play_and_pause(idx)