Exemplo n.º 1
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)
Exemplo n.º 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)
Exemplo n.º 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])
Exemplo n.º 4
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])
Exemplo n.º 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])
Exemplo n.º 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])
Exemplo n.º 7
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])
Exemplo n.º 8
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])