コード例 #1
0
ファイル: addon.py プロジェクト: beenje/plugin.video.m6groupe
def index():
    channels = CHANNELS[int(plugin.get_setting('channels'))]
    if channels == 'all':
        items = [{'label': 'M6Replay', 'path': plugin.url_for('show_channel', channel='M6')},
                {'label': 'W9Replay', 'path': plugin.url_for('show_channel', channel='W9')}]
        return items
    else:
        return show_channel(channels)
コード例 #2
0
def index():
    channels = CHANNELS[int(plugin.get_setting('channels'))]
    if channels == 'all':
        items = [{
            'label': 'M6Replay',
            'path': plugin.url_for('show_channel', channel='M6')
        }, {
            'label': 'W9Replay',
            'path': plugin.url_for('show_channel', channel='W9')
        }]
        return items
    else:
        return show_channel(channels)
コード例 #3
0
def show_clips(channel, program):
    clips = catalog.get_clips(channel, program)
    items = [{
        'label':
        clp['label'],
        'is_playable':
        True,
        'thumbnail':
        clp['thumb'],
        'info': {
            'date': clp['date'],
            'duration': clp['duration'],
            'plot': clp['desc']
        },
        'path':
        plugin.url_for('play_clip', channel=channel, clip=clp['id'])
    } for clp in clips]
    if program == 'all':
        return plugin.finish(items,
                             sort_methods=[
                                 SortMethod.LABEL, SortMethod.DATE,
                                 SortMethod.VIDEO_RUNTIME
                             ])
    else:
        return plugin.finish(items, sort_methods=[SortMethod.DATE])
コード例 #4
0
ファイル: addon.py プロジェクト: beenje/plugin.video.m6groupe
def show_programs(channel, genre):
    programs = catalog.get_programs(channel, genre)
    items = [{'label': pgm['label'],
              'thumbnail': pgm['thumb'],
              'path': plugin.url_for('show_clips', channel=channel, program=pgm['id'])
             } for pgm in programs]
    return plugin.finish(items, sort_methods=[SortMethod.LABEL])
コード例 #5
0
def show_genres(channel):
    genres = catalog.get_genres(channel)
    items = [{
        'label':
        gnr['label'],
        'path':
        plugin.url_for('show_programs', channel=channel, genre=gnr['id'])
    } for gnr in genres]
    return plugin.finish(items, sort_methods=[SortMethod.LABEL])
コード例 #6
0
def show_programs(channel, genre):
    programs = catalog.get_programs(channel, genre)
    items = [{
        'label':
        pgm['label'],
        'thumbnail':
        pgm['thumb'],
        'path':
        plugin.url_for('show_clips', channel=channel, program=pgm['id'])
    } for pgm in programs]
    return plugin.finish(items, sort_methods=[SortMethod.LABEL])
コード例 #7
0
ファイル: addon.py プロジェクト: beenje/plugin.video.m6groupe
def show_clips(channel, program):
    clips = catalog.get_clips(channel, program)
    items = [{'label': clp['label'],
              'is_playable': True,
              'thumbnail': clp['thumb'],
              'info': {'date': clp['date'],
                       'duration': clp['duration'],
                       'plot': clp['desc']},
              'path': plugin.url_for('play_clip', channel=channel, clip=clp['id'])
             } for clp in clips]
    if program == 'all':
        return plugin.finish(items, sort_methods=[SortMethod.LABEL, SortMethod.DATE, SortMethod.VIDEO_RUNTIME])
    else:
        return plugin.finish(items, sort_methods=[SortMethod.DATE])
コード例 #8
0
ファイル: addon.py プロジェクト: beenje/plugin.video.m6groupe
def show_genres(channel):
    genres = catalog.get_genres(channel)
    items = [{'label': gnr['label'],
              'path': plugin.url_for('show_programs', channel=channel, genre=gnr['id'])
             } for gnr in genres]
    return plugin.finish(items, sort_methods=[SortMethod.LABEL])