def show_tv_show_options(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) if modelMap.has_key('error-occurred') and modelMap['error-occurred']: logging.getLogger().debug('found an error message...') window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(True) window.getControl(305).setEnabled(True) logging.getLogger().exception(modelMap['error']) else: window.getControl(502).setPercent(100) window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(502).setPercent(0) logging.getLogger().debug(len(modelMap['tv-show-images'])) window.getControl(901).reset() window.getControl(901).addItems(modelMap['tv-show-images']) window.getControl(900).setVisible(True) window.getControl(305).setEnabled(False) window.setFocusId(901) logging.getLogger().debug('list visible')
def play_video_streams(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) window.getControl(500).setVisible(False) system.hide_busy_dialog() logging.getLogger().debug('play video streams found') if modelMap.has_key('error-occurred') and modelMap['error-occurred']: logging.getLogger().debug('found an error message...') window.getControl(600).setVisible(True) logging.getLogger().exception(modelMap['error']) else: playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() video_items = modelMap['video_streams'] logging.getLogger().debug('total video streams found = %s' % str(len(video_items))) for video_item in video_items: playlist.add(url=video_item.getProperty('streamLink'), listitem=video_item) logging.getLogger().debug('Playlist size = %s ' % str(playlist.size())) xbmc.Player().play(playlist)
def show_tv_channel_episode_videos_list_view(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(False) window.getControl(1000).setVisible(False) window.getControl(804).reset() logging.getLogger().debug( 'Channel name in show_tv_show_episode_videos_list_view = %s' % modelMap['channel-name']) window.getControl(801).setLabel(modelMap['channel-name']) window.getControl(802).setLabel(modelMap['tv-show-name']) window.getControl(803).setLabel(modelMap['episode-name']) window.getControl(804).addItems(modelMap['videos-item-list']) window.getControl(800).setVisible(True) window.setFocusId(804)
def hide_tv_channel_episode_videos_list_view(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) window.getControl(800).setVisible(False) window.getControl(1000).setVisible(True) window.getControl(600).setVisible(False) window.getControl(500).setVisible(False) system.hide_busy_dialog() window.setFocusId(1002)
def show_tv_show_episode_videos_view(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) if modelMap.has_key('error-occurred') and modelMap['error-occurred']: logging.getLogger().debug('found an error message...') window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(True) logging.getLogger().exception(modelMap['error']) else: window.getControl(502).setPercent(0) modelMap['progress_control'] = window.getControl(502) window.getControl(501).setLabel('RESOLVING VIDEOS TO BE PLAYED, PLEASE WAIT...')
def show_tv_channel_episode_videos_list_view(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(False) window.getControl(1000).setVisible(False) window.getControl(804).reset() logging.getLogger().debug('Channel name in show_tv_show_episode_videos_list_view = %s' % modelMap['channel-name']) window.getControl(801).setLabel(modelMap['channel-name']) window.getControl(802).setLabel(modelMap['tv-show-name']) window.getControl(803).setLabel(modelMap['episode-name']) window.getControl(804).addItems(modelMap['videos-item-list']) window.getControl(800).setVisible(True) window.setFocusId(804)
def show_tv_channel_episodes_view(modelMap, window): window.getControl(200).setVisible(False) window.getControl(300).setVisible(False) window.getControl(400).setVisible(False) window.getControl(600).setVisible(False) window.getControl(800).setVisible(False) window.getControl(900).setVisible(False) window.getControl(100).setVisible(False) window.getControl(1001).setLabel(modelMap['channel_name']) image = xbmcgui.ControlImage(30, 30, 174, 147, filename=modelMap['channel_image'], aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) CacheManager().put('channel_image', modelMap['channel_image']) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) system.hide_busy_dialog() if modelMap.has_key('error-occurred') and modelMap['error-occurred']: logging.getLogger().debug('found an error message...') window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(True) logging.getLogger().exception(modelMap['error']) else: logging.getLogger().debug('total tv show episodes: %s' % str(len(modelMap['tv_show_episode_items']))) window.getControl(1002).reset() window.getControl(1002).addItems(modelMap['tv_show_episode_items']) window.getControl(1000).setVisible(True) window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(False) window.setFocusId(1002)
def show_tv_show_episode_videos_view(modelMap, window): image = xbmcgui.ControlImage(30, 30, 174, 147, filename=CacheManager().get('channel_image'), aspectRatio=0, colorDiffuse='0xFFF7F7F7') window.addControl(image) controls = CacheManager().get('controls_to_be_deleted') controls.append(image) if modelMap.has_key('error-occurred') and modelMap['error-occurred']: logging.getLogger().debug('found an error message...') window.getControl(500).setVisible(False) system.hide_busy_dialog() window.getControl(600).setVisible(True) logging.getLogger().exception(modelMap['error']) else: window.getControl(502).setPercent(0) modelMap['progress_control'] = window.getControl(502) window.getControl(501).setLabel( 'RESOLVING VIDEOS TO BE PLAYED, PLEASE WAIT...')
def onInit(self): logging.getLogger().debug('Window OnInit called...') system.hide_busy_dialog() self._handle_event_func('INIT')