本文整理汇总了Python中api.NetEase.fm_like方法的典型用法代码示例。如果您正苦于以下问题:Python NetEase.fm_like方法的具体用法?Python NetEase.fm_like怎么用?Python NetEase.fm_like使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.NetEase
的用法示例。
在下文中一共展示了NetEase.fm_like方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from api import NetEase [as 别名]
# 或者: from api.NetEase import fm_like [as 别名]
#.........这里部分代码省略.........
self.dispatch_enter(8)
# 播放下一曲
elif key == ord(']'):
if len(self.storage.database["player_info"]["player_list"]) == 0:
continue
self.player.next()
time.sleep(0.1)
# 播放上一曲
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)