Example #1
0
    def createParamsAddons(self, menuName, video):
        paramsAddons = {}
        paramsAddons[menuName] = "True"
        paramsAddons[self.PARAM_ARTE_CATEGORIE] = self.ARTE_CATEGORIE

        if self.ARTE_CATEGORIE == self.PARAM_ARTE_LIVE:
            paramsAddons[self.PARAM_VIDEO_ID] = str(video.order)

        else:
            paramsAddons[self.PARAM_VIDEO_ID] = video.link

        paramsAddons[self.PARAM_VIDEO_NAME] = strip_html(video.title)

        return paramsAddons
Example #2
0
    def updateVideosInfos(self, video):
        name = strip_html(video.date + " - " + video.title)
        year = " "
        summary = strip_html(video.pitch.encode('utf-8'))
        genre = " "
        country = " "
        if isinstance(self.PARSER, PlusParser):
            infos = self.PARSER.fetch_summary(video.link)
            if infos[0] and infos[1] and infos[2]:
                try:
                    splitted_text = (infos[1][1:-1]).split(',')
                    year = splitted_text[1].encode('utf-8')
                    country = splitted_text[0].encode('utf-8')
                    genre = infos[2].encode('utf-8')
                    summary = infos[0].encode('utf-8')

                except Exception, why:
                    year = " "
                    summary = " "
                    genre = " "
                    country = " "
                    print "Erreur while getting video infos"
                    print_exc()
Example #3
0
    def createParamsAddons( self, menuName, video ):
        paramsAddons = {}
        paramsAddons[ menuName ]  = "True"
        paramsAddons[ self.PARAM_ARTE_CATEGORIE ] = self.ARTE_CATEGORIE

        if self.ARTE_CATEGORIE == self.PARAM_ARTE_LIVE:
            paramsAddons[ self.PARAM_VIDEO_ID ] = str( video.order )

        else:
            paramsAddons[ self.PARAM_VIDEO_ID ] = video.link

        paramsAddons[ self.PARAM_VIDEO_NAME ] = strip_html( video.title )

        return paramsAddons
Example #4
0
    def updateVideosInfos(self, video):
        name = strip_html( video.date + " - " + video.title )
        year = " "
        summary = strip_html( video.pitch.encode('utf-8') )
        genre = " "
        country = " "
        if isinstance( self.PARSER, PlusParser ) :
            infos = self.PARSER.fetch_summary(video.link)
            if infos[0] and infos[1] and infos[2]:
                try:
                    splitted_text = (infos[1][1:-1]).split(',')
                    year          = splitted_text[1].encode('utf-8')
                    country       = splitted_text[0].encode('utf-8')
                    genre         = infos[2].encode('utf-8')
                    summary       = infos[0].encode('utf-8')
		
                except Exception, why:
                    year    = " "
                    summary = " "
                    genre   = " "
                    country = " "
                    print "Erreur while getting video infos"
                    print_exc()
Example #5
0
                    splitted_text = (infos[1][1:-1]).split(',')
                    year = splitted_text[1].encode('utf-8')
                    country = splitted_text[0].encode('utf-8')
                    genre = infos[2].encode('utf-8')
                    summary = infos[0].encode('utf-8')

                except Exception, why:
                    year = " "
                    summary = " "
                    genre = " "
                    country = " "
                    print "Erreur while getting video infos"
                    print_exc()

        infoLabels = {
            "Title": strip_html(video.title),
            "Overlay": "",
            "Size": "",
            "Year": year,
            "Plot": strip_html(summary),
            "PlotOutline": strip_html(video.pitch.encode('utf-8')),
            "MPAA": "",
            "Genre": strip_html(genre),
            "Studio": "",
            "Country": country,
            "Director": video.author,
            "Duration": video.duration,
            "Cast": "",
            "Date": video.date
        }
Example #6
0
                try:
                    splitted_text = (infos[1][1:-1]).split(',')
                    year          = splitted_text[1].encode('utf-8')
                    country       = splitted_text[0].encode('utf-8')
                    genre         = infos[2].encode('utf-8')
                    summary       = infos[0].encode('utf-8')
		
                except Exception, why:
                    year    = " "
                    summary = " "
                    genre   = " "
                    country = " "
                    print "Erreur while getting video infos"
                    print_exc()

        infoLabels={ "Title": strip_html( video.title ), 
                     "Overlay": "", 
                     "Size": "", 
                     "Year": year, 
                     "Plot": strip_html( summary ), 
                     "PlotOutline": strip_html( video.pitch.encode('utf-8') ), 
                     "MPAA": "", 
                     "Genre": strip_html( genre ),
                     "Studio": "", 
                     "Country":country,
                     "Director": video.author, 
                     "Duration": video.duration,
                     "Cast": "",
                     "Date": video.date }

        c_items = self.createVideoContextMenu( video )