コード例 #1
0
def video_sec(params):
    """This function list de videos for the Emissions, Chroniques, Series, and Search sections."""
    p.log("ltl.video_sec " + repr(params))

    video_list = api.get_video_sec(params.get('url'))

    video_items = [{
        'thumbnail':
        video_entry.get('thumbnail') or '',
        'info': {
            'title': video_entry.get('title'),
            'plot': video_entry.get('plot') or '',
            'studio': video_entry.get('credits') or '',
            'genre': video_entry.get('genre') or '',
            'year': video_entry.get('year') or '',
            'rating': video_entry.get('rating') or '',
        },
        'path':
        p.get_plugin_path(
            url=video_entry['url'],
            action='play_video' if video_entry['IsPlayable'] else 'video_sec',
        ),
        'IsPlayable':
        video_entry['IsPlayable'],
    } for video_entry in video_list]

    p.add_items(video_items)
コード例 #2
0
def video_sec(params):
    """This function list de videos for the Emissions, Chroniques, Series, and Search sections."""
    p.log("ltl.video_sec "+repr(params))

    video_list = api.get_video_sec(params.get('url'))

    video_items = [ {
        'thumbnail' : video_entry.get('thumbnail') or '',
        'info': {
            'title' : video_entry.get('title'),
            'plot'  : video_entry.get('plot')      or '',
            'studio': video_entry.get('credits')   or '',
            'genre' : video_entry.get('genre')     or '',
            'year'  : video_entry.get('year')      or '',
            'rating': video_entry.get('rating')    or '',
        },
        'path'      : p.get_plugin_path(
            url     = video_entry['url'],
            action  = 'play_video' if video_entry['IsPlayable'] else 'video_sec',
        ),
        'IsPlayable': video_entry['IsPlayable'],
        }  for video_entry in video_list]

    p.add_items(video_items)
コード例 #3
0
 def test_5_video_hackaround(self):
     menu_url = 'http://latelelibre.fr/series/une-bien-belge-histoire/'
     video_list = api.get_video_sec(menu_url)
     self.assertTrue(video_list is not None and len(video_list) > 4)
コード例 #4
0
 def test_4_video_sec(self):
     menu_url = 'http://latelelibre.fr/emissions/thibault-o-tour-du-monde/'
     video_list = api.get_video_sec(menu_url)
     self.assertTrue(video_list is not None and len(video_list) > 8)
コード例 #5
0
 def test_5_video_hackaround(self):
     menu_url = 'http://latelelibre.fr/series/une-bien-belge-histoire/'
     video_list = api.get_video_sec(menu_url)
     self.assertTrue(video_list is not None and len(video_list) > 4)
コード例 #6
0
 def test_4_video_sec(self):
     menu_url = 'http://latelelibre.fr/emissions/thibault-o-tour-du-monde/'
     video_list = api.get_video_sec(menu_url)
     self.assertTrue(video_list is not None and len(video_list) > 8)