Beispiel #1
0
    def __init__(self, menuw, movie):
        if movie is None:
            name = _('No Information Available')
            description = ''
        else:
            self.movie = movie
            name = movie.name
            sub_title = movie['tagline']
            desc = movie['plot']
            # gather the info and construct the description text
            if sub_title:
                # subtitle + newline + description
                description = u'"' + sub_title + u'"\n' + desc + u'\n\n'
            else:
                # or just the description, if there is no subtitle
                description = desc + u'\n\n'
            # add some additional info if they are available
            if movie['genre']:
                description += _('Genre') + u' : '+movie['genre'] + u'\n'
            if movie['length']:
                description +=  _('Length')+ u' : '+movie['length'] + u'\n'
            if movie['year']:
                description +=  _('Year')+u' : '+movie['year'] + u'\n'
            if movie['rating']:
                description +=  _('Rating')+u' : '+movie['rating'] + u'\n'
            if movie['mpaa']:
                description +=  _('MPAA')+u' : '+movie['mpaa'] + u'\n'

        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name            = name
        self.visible = True

        self.show(menuw)
Beispiel #2
0
    def __init__(self, menuw, movie):
        if movie is None:
            name = _('No Information Available')
            description = ''
        else:
            self.movie = movie
            name = movie.name
            sub_title = movie['tagline']
            desc = movie['plot']
            # gather the info and construct the description text
            if sub_title:
                # subtitle + newline + description
                description = u'"' + sub_title + u'"\n' + desc + u'\n\n'
            else:
                # or just the description, if there is no subtitle
                description = desc + u'\n\n'
            # add some additional info if they are available
            if movie['genre']:
                description += _('Genre') + u' : ' + movie['genre'] + u'\n'
            if movie['length']:
                description += _('Length') + u' : ' + movie['length'] + u'\n'
            if movie['year']:
                description += _('Year') + u' : ' + movie['year'] + u'\n'
            if movie['rating']:
                description += _('Rating') + u' : ' + movie['rating'] + u'\n'
            if movie['mpaa']:
                description += _('MPAA') + u' : ' + movie['mpaa'] + u'\n'

        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name = name
        self.visible = True

        self.show(menuw)
Beispiel #3
0
    def __init__(self, menuw, movie):
        if movie is None:
            name = _('No Information Available')
            description = ''
        else:
            self.movie = movie
            name = movie['title']
            desc = movie['plot']

            if config.SKIN_HANDLES_DETAILS:
                # This is a skin that handles the details (like xbmc one) by itself.
                # We only provide the plot then and let the skin display what it wants.
                # The skin will handle all the rest.
                description = desc
            else:
                # OK, these are the simplistic skins that like all given on the plate
                # let's format the description with all info necessary.
                sub_title = movie['tagline']
                # gather the info and construct the description text
                if sub_title:
                    # subtitle + newline + description
                    description = u'"' + sub_title + u'"\n' + desc + u'\n\n'
                else:
                    # or just the description, if there is no subtitle
                    description = desc + u'\n\n'
                # add some additional info if they are available
                if movie['genre']:
                    description += _('Genre') + u' : ' + movie['genre'] + u'\n'
                if movie['length']:
                    description += _(
                        'Length') + u' : ' + movie['length'] + u'\n'
                if movie['year']:
                    description += _('Year') + u' : ' + movie['year'] + u'\n'
                if movie['rating']:
                    description += _(
                        'Rating') + u' : ' + movie['rating'] + u'\n'
                if movie['mpaa']:
                    description += _('MPAA') + u' : ' + movie['mpaa'] + u'\n'

        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name = name
        self.visible = True

        if movie.skin_fxd:
            self.skin_settings = skin.load(movie.skin_fxd)

        self.show(menuw)
Beispiel #4
0
    def __init__(self, menuw, movie):
        if movie is None:
            name = _('No Information Available')
            description = ''
        else:
            self.movie = movie
            name = movie['title']
            desc = movie['plot']
            
            if config.SKIN_HANDLES_DETAILS:
                # This is a skin that handles the details (like xbmc one) by itself.
                # We only provide the plot then and let the skin display what it wants.
                # The skin will handle all the rest.
                description = desc
            else:
                # OK, these are the simplistic skins that like all given on the plate
                # let's format the description with all info necessary.
                sub_title = movie['tagline']
                # gather the info and construct the description text
                if sub_title:
                    # subtitle + newline + description
                    description = u'"' + sub_title + u'"\n' + desc + u'\n\n'
                else:
                    # or just the description, if there is no subtitle
                    description = desc + u'\n\n'
                # add some additional info if they are available
                if movie['genre']:
                    description += _('Genre') + u' : '+movie['genre'] + u'\n'
                if movie['length']:
                    description +=  _('Length')+ u' : '+movie['length'] + u'\n'
                if movie['year']:
                    description +=  _('Year')+u' : '+movie['year'] + u'\n'
                if movie['rating']:
                    description +=  _('Rating')+u' : '+movie['rating'] + u'\n'
                if movie['mpaa']:
                    description +=  _('MPAA')+u' : '+movie['mpaa'] + u'\n'

        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name    = name
        self.visible = True
        
        if movie.skin_fxd:
            self.skin_settings = skin.load(movie.skin_fxd)

        self.show(menuw)
Beispiel #5
0
    def __init__(self, menuw, prg):
        logger.log(9, 'ShowProgramDetails.__init__(menuw=%r, prg=%r)', menuw,
                   prg)
        if prg is None:
            name = _('No Information Available')
        else:
            self.program = prg
            name = prg.title
            # gather the info and construct the description text
            if hasattr(prg, 'sub_title') and prg.sub_title:
                # subtitle + newline + description
                description = u'"' + Unicode(prg.sub_title) + u'"\n' + Unicode(
                    prg.description)
            else:
                # or just the description, if there is no subtitle
                description = Unicode(prg.description)

            if prg.prog.date:
                description += u'\n\n' + _('Date : ') + prg.prog.date

            # maybe there is more info to add (categories, advisories, ratings)
            if prg.categories:
                description += u'\n'
                for category in prg.categories:
                    description += u'\n' + _('Category : ') + category

            if prg.advisories:
                description += u'\n'
                for advisory in prg.advisories:
                    description += u'\n' + _('Advisory : ') + advisory

            if prg.ratings:
                description += u'\n'
                for system, value in prg.ratings.items():
                    description += u'\n' + _(
                        'Rating') + u'(' + system + u') : ' + value

        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name = name
        self.event_context = 'tvmenu'
        self.show(menuw)
Beispiel #6
0
    def __init__(self, menuw, prg):
        logger.log( 9, 'ShowProgramDetails.__init__(menuw=%r, prg=%r)', menuw, prg)
        if prg is None:
            name = _('No Information Available')
        else:
            self.program = prg
            name = prg.title
            # gather the info and construct the description text
            if hasattr(prg, 'sub_title') and  prg.sub_title:
            # subtitle + newline + description
                description = u'"' + Unicode(prg.sub_title) + u'"\n' + Unicode(prg.description)
            else:
                # or just the description, if there is no subtitle
                description = Unicode(prg.description)

            if prg.prog.date:
                description += u'\n\n' + _('Date : ') + prg.prog.date
            
            # maybe there is more info to add (categories, advisories, ratings)
            if prg.categories:
                description += u'\n'
                for category in prg.categories:
                    description += u'\n' + _('Category : ') + category

            if prg.advisories:
                description += u'\n'
                for advisory in prg.advisories:
                    description += u'\n' + _('Advisory : ') + advisory

            if prg.ratings:
                description += u'\n'
                for system, value in prg.ratings.items():
                    description += u'\n' + _('Rating') + u'(' + system + u') : ' + value


        # that's all, we can show this to the user
        ScrollableTextScreen.__init__(self, 'tvguideinfo', description)
        self.name = name
        self.event_context = 'tvmenu'
        self.show(menuw)
Beispiel #7
0
    def eventhandler(self, event, menuw=None):
        """
        eventhandler for the programm description display
        """
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)

        if not event_consumed:
            if event == MENU_PLAY_ITEM:
                self.menuw.back_one_menu()
                # try to watch this program
                self.movie.play(menuw=self.menuw)
                event_consumed = True

        return event_consumed
Beispiel #8
0
    def eventhandler(self, event, menuw=None):
        """
        eventhandler for the programm description display
        """
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)

        if not event_consumed:
            if event == MENU_PLAY_ITEM:
                self.menuw.back_one_menu()
                # try to watch this program
                self.movie.play(menuw=self.menuw)
                event_consumed = True

        return event_consumed
Beispiel #9
0
    def eventhandler(self, event, menuw=None):
        """
        eventhandler for the programm description display
        """
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)

        if not event_consumed:
            if event == MENU_PLAY_ITEM:
                self.menuw.delete_menu()
                self.menuw.delete_submenu(refresh=False)
                # try to watch this program
                self.audio.play(menuw=self.menuw)
                event_consumed = True

        return event_consumed
Beispiel #10
0
    def eventhandler(self, event, menuw=None):
        """
        eventhandler for the programm description display
        """
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)

        if not event_consumed:
            if event == MENU_PLAY_ITEM:
                self.menuw.delete_menu()
                self.menuw.delete_submenu(refresh = False)
                # try to watch this program
                self.audio.play(menuw=self.menuw)
                event_consumed = True

        return event_consumed
Beispiel #11
0
    def eventhandler(self, event, menuw=None):
        """ event handler for the programme description display """
        logger.log(9, 'eventhandler(event=%r, menuw=%r)', event, menuw)
        menuw = self.menuw
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)
        if not event_consumed:
            if event == PLAY:
                menuw.delete_menu()
                # try to watch this program
                self.program.play(menuw=menuw)
                event_consumed = True
            elif event == TV_START_RECORDING:
                menuw.delete_menu()
                # short cut to change the schedule status of this program
                self.program.toggle_rec(menuw=menuw)
                event_consumed = True

        return event_consumed
Beispiel #12
0
    def eventhandler(self, event, menuw=None):
        """ event handler for the programme description display """
        logger.log( 9, 'eventhandler(event=%r, menuw=%r)', event, menuw)
        menuw = self.menuw
        event_consumed = ScrollableTextScreen.eventhandler(self, event, menuw)
        if not event_consumed:
            if event == PLAY:
                menuw.delete_menu()
                # try to watch this program
                self.program.play(menuw=menuw)
                event_consumed = True
            elif event == TV_START_RECORDING:
                menuw.delete_menu()
                # short cut to change the schedule status of this program
                self.program.toggle_rec(menuw=menuw)
                event_consumed = True

        return event_consumed
Beispiel #13
0
 def __init__(self, menuw, audio, lyrics):
     ScrollableTextScreen.__init__(self, 'tvguideinfo', lyrics)
     self.name = audio.name
     self.audio = audio
     self.show(menuw)
Beispiel #14
0
 def __init__(self, menuw, audio, lyrics):
     ScrollableTextScreen.__init__(self, 'tvguideinfo', lyrics)
     self.name = audio.name
     self.audio           = audio
     self.show(menuw)
Beispiel #15
0
 def show_details(self, arg=None, menuw=None):
     screen = ScrollableTextScreen('headlines', arg.description)
     screen.show(menuw)
Beispiel #16
0
 def show_details(self, arg=None, menuw=None):
     screen = ScrollableTextScreen('headlines', arg.description)
     screen.show(menuw)