本文整理汇总了Python中pp_medialist.MediaList.select_anon_by_index方法的典型用法代码示例。如果您正苦于以下问题:Python MediaList.select_anon_by_index方法的具体用法?Python MediaList.select_anon_by_index怎么用?Python MediaList.select_anon_by_index使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pp_medialist.MediaList
的用法示例。
在下文中一共展示了MediaList.select_anon_by_index方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MenuShow
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import select_anon_by_index [as 别名]
#.........这里部分代码省略.........
operation=self.base_lookup_control(symbol,self.controls_list)
self.do_operation(operation)
def do_operation(self,operation):
# service the standard inputs for this show
self.mon.trace(self,operation)
if operation =='exit':
self.exit()
elif operation == 'stop':
self.stop_timers()
if self.current_player is not None:
if self.menu_showing is True and self.level != 0:
# if quiescent then set signal to stop the show when track has stopped
self.user_stop_signal=True
self.current_player.input_pressed('stop')
elif operation in ('up','down'):
# stop show timeout
if self.show_timeout_timer is not None:
self.canvas.after_cancel(self.show_timeout_timer)
# and start it again
if self.show_timeout != 0:
self.show_timeout_timer=self.canvas.after(self.show_timeout*1000,self.show_timeout_stop)
if operation=='up':
self.previous()
else:
self.next()
elif operation =='play':
self.next_track_signal=True
st=self.medialist.select_anon_by_index(self.menu_index)
self.next_track=self.medialist.selected_track()
self.current_player.stop()
# cancel show timeout
if self.show_timeout_timer is not None:
self.canvas.after_cancel(self.show_timeout_timer)
self.show_timeout_timer=None
# stop current track (the menuplayer) if running or just start the next track
if self.current_player is not None:
self.current_player.input_pressed('stop')
else:
self.what_next_after_showing()
elif operation in ('no-command','null'):
return
elif operation in ('pause','pause-on','pause-off','mute','unmute','go'):
if self.current_player is not None:
self.current_player.input_pressed(operation)
elif operation[0:4]=='omx-' or operation[0:6]=='mplay-'or operation[0:5]=='uzbl-':
if self.current_player is not None:
self.current_player.input_pressed(operation)
def next(self):
# remove highlight
if self.current_player.__class__.__name__ == 'MenuPlayer':
self.current_player.highlight_menu_entry(self.menu_index,False)
self.medialist.next('ordered')