本文整理汇总了Python中pp_medialist.MediaList.anon_length方法的典型用法代码示例。如果您正苦于以下问题:Python MediaList.anon_length方法的具体用法?Python MediaList.anon_length怎么用?Python MediaList.anon_length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pp_medialist.MediaList
的用法示例。
在下文中一共展示了MediaList.anon_length方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MenuShow
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import anon_length [as 别名]
#.........这里部分代码省略.........
# *********************
def start_load_show_loop(self,selected_track):
# shuffle players
Show.base_shuffle(self)
self.mon.trace(self,'')
self.display_eggtimer()
# get control bindings for this show
# needs to be done for each track as track can override the show controls
if self.show_params['disable-controls'] == 'yes':
self.controls_list=[]
else:
reason,message,self.controls_list= self.controlsmanager.get_controls(self.show_params['controls'])
if reason=='error':
self.mon.err(self,message)
self.end('error',"error in controls: " + message)
return
# load the track or show
Show.base_load_track_or_show(self,selected_track,self.what_next_after_load,self.end_shower,False)
# track has loaded (menu or otherwise) so show it.
def what_next_after_load(self,status,message):
if self.current_player.play_state=='load-failed':
self.req_next='error'
self.what_next_after_showing()
else:
# get the calculated length of the menu for the loaded menu track
if self.current_player.__class__.__name__ == 'MenuPlayer':
if self.medialist.anon_length()==0:
self.req_next='error'
self.what_next_after_showing()
return
#highlight either first or returning entry and select appropiate medialist entry
if self.return_to_zero is True:
# init the index used to hiighlight the selected menu entry by menuplayer
self.menu_index=0
# print 'initial index',self.menu_index
else:
self.menu_index=self.last_menu_index
# print ' return to last ',self.menu_index
self.menu_length=self.current_player.menu_length
self.current_player.highlight_menu_entry(self.menu_index,True)
self.mon.trace(self,' - load complete with status: ' + status + ' message: ' + message)
if self.show_timeout_signal is True or self.terminate_signal is True or self.exit_signal is True or self.user_stop_signal is True:
self.what_next_after_showing()
else:
self.mon.trace(self,'')
self.current_player.show(self.track_ready_callback,self.finished_showing,self.closed_after_showing)
def finished_showing(self,reason,message):
# showing has finished with 'pause at end', showing the next track will close it after next has started showing
self.mon.trace(self,'')
self.mon.log(self,"pause at end of showing track with reason: "+reason+ ' and message: '+ message)
self.sr.hide_click_areas(self.controls_list)
if self.current_player.play_state == 'show-failed':