当前位置: 首页>>代码示例>>Python>>正文


Python Show.base_init_selected_player方法代码示例

本文整理汇总了Python中pp_show.Show.base_init_selected_player方法的典型用法代码示例。如果您正苦于以下问题:Python Show.base_init_selected_player方法的具体用法?Python Show.base_init_selected_player怎么用?Python Show.base_init_selected_player使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pp_show.Show的用法示例。


在下文中一共展示了Show.base_init_selected_player方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: load_first_track

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import base_init_selected_player [as 别名]
 def load_first_track(self):
     self.mon.trace(self,'')
     if self.medialist.start() is False:
         # list is empty - display a message for 5 secs and then retry
         Show.display_admin_message(self,self.show_params['empty-text'])
         self.canvas.after(5000,self.remove_list_empty_message)
     else:
         # otherwise load the first track
         # print "!!!!! artshow init first"
         self.next_player=Show.base_init_selected_player(self,self.medialist.selected_track())
         if self.next_player is None:
             self.mon.err(self,"Track Type cannot be played by this show: "+self.medialist.selected_track()['type'])
             self.req_next='error'
             self.what_next()
         else:
             # messageplayer passes the text not a file name
             if self.medialist.selected_track()['type'] == 'message':
                 track_file=self.medialist.selected_track()['text']
             else:
                 track_file=Show.base_complete_path(self,self.medialist.selected_track()['location'])
             # print "!!!!! artshow load first ",track_file
             self.next_player.load(track_file,
                                   self.loaded_callback,
                                   enable_menu=False)
             self.wait_for_load() 
开发者ID:athope,项目名称:pipresents-gapless,代码行数:27,代码来源:pp_artshow.py

示例2: what_to_load_next

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import base_init_selected_player [as 别名]
    def what_to_load_next(self):
        self.mon.trace(self,self.pretty_state ())

        # closing down so don't load anything
        if self.ending_reason in ('killed','error'):
            return

        # wanting to exit so don't load just skip to what-next
        if self.terminate_signal is True or self.exit_signal is True or self.req_next=='error':
            self.what_next()

        # has content of list been changed (replaced if it has, used for content of livelist)
        if self.medialist.replace_if_changed() is True:
            self.ending_reason='change-medialist'
            self.close_current_and_next()
        else:
            # get the next track and init player
            self.medialist.next(self.show_params['sequence'])
            if self.medialist.at_end() is True:
                self.end_medialist_warning=True
            # print "!!!!! artshow init next "
            self.next_player=Show.base_init_selected_player(self,self.medialist.selected_track())
            if self.next_player is None:
                self.mon.err(self,"Track Type cannot be played by this show: "+self.medialist.selected_track()['type'])
                self.req_next='error'
                self.what_next()
            else:
                # and load the next after a wait to allow animation etc to be timely.
                self.canvas.after(self.load_delay,self.load_next)
开发者ID:athope,项目名称:pipresents-gapless,代码行数:31,代码来源:pp_artshow.py

示例3: what_to_load_next

# 需要导入模块: from pp_show import Show [as 别名]
# 或者: from pp_show.Show import base_init_selected_player [as 别名]
    def what_to_load_next(self):
        self.mon.trace(self,self.pretty_state ())

        # closing down so don't load anything
        if self.ending_reason in ('killed','error'):
            return

        # wanting to exit so don't load just skip to what-next
        if self.terminate_signal is True or self.exit_signal is True or self.req_next=='error':
            self.what_next()

        # has content of list been changed (replaced if it has, used for content of livelist)
        # print 'WHAT to load NEXT'
        self.medialist.create_new_livelist()

        # print result, self.medialist.new_length(),self.medialist.anon_length()
        if self.medialist.livelist_changed() is True:
            # print 'ITS CHANGED'
            self.ending_reason='change-medialist'
            self.close_current_and_next()
        else:
            # get the next track and init player
            self.medialist.next(self.show_params['sequence'])
            Show.delete_admin_message(self)
            if self.medialist.at_end() is True:
                self.end_medialist_warning=True
            # print "!!!!! artshow init next "
            self.next_player=Show.base_init_selected_player(self,self.medialist.selected_track())
            if self.next_player is None:
                self.mon.err(self,"Track Type cannot be played by this show: "+self.medialist.selected_track()['type'])
                self.req_next='error'
                self.what_next()
            else:
                # load the next track while current is showing
                # messageplayer passes the text not a file name
                if self.medialist.selected_track()['type'] == 'message':
                    track_file=self.medialist.selected_track()['text']
                else:
                    track_file=Show.base_complete_path(self,self.medialist.selected_track()['location'])
                # print "!!!!! artshow load next ",track_file
                self.mon.trace(self, track_file)
                self.next_player.load(track_file,
                                      self.loaded_callback,
                                      enable_menu=False)
开发者ID:KenT2,项目名称:pipresents-gapless,代码行数:46,代码来源:pp_artshow.py


注:本文中的pp_show.Show.base_init_selected_player方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。