示例#1
0
    def do_channels_filters(self):
        filters = ['All Languages'] + self.app.data.load_languages()
        remove_widget_children(self.channels_filters)

        for filter_name in filters:
            filterbox = FilterBox(filter_name=filter_name)
            self.channels_filters.add(filterbox)
示例#2
0
    def do_matches_list(self):
        fixtures = self.app.data.load_fixtures(True)
        remove_widget_children(self.matches_list)

        for fixture in fixtures:
            self.do_match_item(fixture)
            yield True
示例#3
0
    def do_channels_list(self):
        channels = self.app.data.load_channels(True)
        remove_widget_children(self.channels_list)

        for channel in channels:
            self.do_channel_item(channel)
            yield True
示例#4
0
    def do_channels_filters(self):
        filters = self.app.data.load_channels_filters()
        remove_widget_children(self.channels_filters)

        for filter_name in filters:
            self.do_filter_item(filter_name)
            yield True
示例#5
0
    def do_channels_list(self):
        channels = self.app.data.load_channels(True)
        remove_widget_children(self.channels_list)

        for channel in channels:
            channbox = ChannelBox(channel=channel,
                                  callback=self.app.player.open_stream)
            self.channels_list.add(channbox)
示例#6
0
    def do_matches_filters(self):
        filters = ['All Competitions'] + self.app.data.load_competitions(
            True, True)
        remove_widget_children(self.matches_filters)

        for filter_name in filters:
            filterbox = FilterBox(filter_name=filter_name)
            self.matches_filters.add(filterbox)
示例#7
0
    def do_matches_list(self):
        fixtures = self.app.data.load_fixtures(True)
        remove_widget_children(self.matches_list)

        for fixture in fixtures:
            matchbox = MatchBox(fixture=fixture,
                                callback=self.on_match_activated)
            self.matches_list.add(matchbox)
示例#8
0
    def do_matches_filters(self):
        filters = self.app.data.load_matches_filters()
        remove_widget_children(self.matches_filters)

        for filter_name in filters:
            self.do_filter_item(filter_name)
            yield True

        run_generator(self.update_matches_filters)
示例#9
0
    def do_match_details(self, fixture):
        remove_widget_children(self.match_teams)
        remove_widget_children(self.match_streams)

        teambox = MatchTeamsBox(fixture=fixture)
        self.match_teams.pack_start(teambox, True, True, 0)

        if fixture.events.count() == 0:
            streambox = MatchStreamBox(stream=None, callback=None)
            self.match_streams.add(streambox)

        for event in fixture.events:
            streambox = MatchStreamBox(stream=event.stream,
                                       callback=self.app.player.open_stream)
            self.match_streams.add(streambox)
示例#10
0
 def update_stream_box(self):
     remove_widget_children(self)
     self.do_stream_box()
示例#11
0
 def update_channel_streams(self):
     remove_widget_children(self)
     self.do_channel_streams()