Пример #1
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import hltv
from resources.lib.common import *

client = Client()

args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', ['home'])[0]
title = args.get('title', [''])[0]
id = args.get('id', [''])[0]
params = args.get('params', [''])[0]
if not args:
    args = version
log('[%s] arguments: %s' % (addon_id, str(args)))

if mode == 'home':
    hltv.home_items(client.matches())
elif mode == 'archive':
    hltv.archive_items(client.archive())
elif mode == 'details':
    hltv.details_items(client.request(base_hltv + id))
elif mode == 'play':
    hltv.play(id)
Пример #2
0
# -*- coding: utf-8 -*-

from resources.lib.common import *
from resources.lib.client import Client
from resources.lib import sport1
from resources.lib import cache

client = Client()

def tv_category():
    if addon.getSetting('startup') == 'true':
        video_root = client.get_video_root()
        if video_root:
            cache.cache_data(video_root)
            addon.setSetting('startup', 'false')
    data = client.get_tv_epg()
    list_items(sport1.get_tv_items(data))
    xbmcplugin.endOfDirectory(addon_handle)

def video_category():
    data = cache.get_cache_data()
    if data:
        list_items(sport1.get_video_category_items(data, id))
    xbmcplugin.endOfDirectory(addon_handle)

def videos():
    if 'api/playlist' in id:
        url = id
    else:
        url = sport1.get_playlist_url(client.get_resource(id))
    if url:
Пример #3
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import dazn
from resources.lib.common import *

client = Client()


def run():
    if mode == 'rails':
        dazn.rails_items(client.rails(id, params))
    elif mode == 'rail':
        dazn.rail_items(client.rail(id, params))
    elif mode == 'play':
        dazn.playback(client.playback(id))
    elif mode == 'play_context':
        dazn.play_context(client.playback(id), title)


args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', ['rails'])[0]
title = args.get('title', [''])[0]
id = args.get('id', ['home'])[0]
params = args.get('params', [''])[0]
if not args:
    args = version
log('[%s] arguments: %s' % (addon_id, str(args)))

if id == 'home':
    if uniq_id():
Пример #4
0
# -*- coding: utf-8 -*-

import sys
import urlparse
from resources.lib.common import Common
from resources.lib.client import Client
from resources.lib.parser import Parser

handle_ = int(sys.argv[1])
url_ = sys.argv[0]

plugin = Common(
    addon_handle=handle_,
    addon_url=url_
)
client = Client(plugin)
parser = Parser(plugin)

def router(paramstring):
    args = dict(urlparse.parse_qs(sys.argv[2][1:]))
    mode = args.get('mode', ['root'])[0]
    id_ = args.get('id', [''])[0]
    params = args.get('params', [''])[0]

    if mode == 'root':
        parser.channel(client.channels())
    elif mode == 'sports':
        parser.sport(client.categories())
    elif mode == 'all_sports':
        parser.all_sports(client.category_all())
    elif mode == 'events':
Пример #5
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import items
from resources.lib.common import *

client = Client()

def run():
    if mode == 'rails':
        items.rails_items(client.rails(id,params))
    elif mode == 'rail':
        items.rail_items(client.rail(id,params))
    elif mode == 'play':
        items.playback(client.playback(id))
    elif mode == 'play_context':
        items.play_context(client.playback(id), title)

args   = urlparse.parse_qs(sys.argv[2][1:])
mode   = args.get('mode', ['rails'])[0]
title  = args.get('title', [''])[0]
id     = args.get('id', ['home'])[0]
params = args.get('params', [''])[0]
if not args:
    args = version
log('[%s] arguments: %s' % (addon_id, str(args)))

if id == 'home':
    client.startUp()
    if client.TOKEN:
        run()
Пример #6
0
# -*- coding: utf-8 -*-

import sys
import urlparse
from resources.lib.common import Common
from resources.lib.client import Client
from resources.lib.parser import Parser

handle_ = int(sys.argv[1])
url_ = sys.argv[0]

plugin = Common(
    addon_handle=handle_,
    addon_url=url_
)
client = Client(plugin)
parser = Parser(plugin)

def router(paramstring):
    args = dict(urlparse.parse_qs(paramstring))
    mode = args.get('mode', ['rails'])[0]
    title = args.get('title', [''])[0]
    id_ = args.get('id', ['home'])[0]
    params = args.get('params', [''])[0]

    if mode == 'rails':
        parser.rails_items(client.rails(id_, params), id_)
    elif 'rail' in mode:
        parser.rail_items(client.rail(id_, params), mode)
    elif 'epg' in mode:
        date = params
Пример #7
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import wtatv
from resources.lib.common import *

client = Client()

def run():
    if mode == 'home':
        wtatv.home_items()
    elif mode == 'events':
        wtatv.event_items(client.events())
    elif mode == 'features':
        wtatv.video_items(client.features())
    elif mode == 'ondemand':
        wtatv.video_items(client.ondemand())
    elif mode == 'play_live':
        wtatv.play_live(client.streaming(id))
    elif mode == 'play_vod':
        wtatv.play_vod(client.vod(id))

args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', ['home'])[0]
title = args.get('title', [''])[0]
id = args.get('id', ['home'])[0]
params = args.get('params', [''])[0]
if not args:
    args = version
log('[%s] arguments: %s' % (addon_id, str(args)))
Пример #8
0
from resources.lib.client import Client
from resources.lib.common import Common
from resources.lib.credential import Credential
from resources.lib.parser import Parser

handle_ = int(sys.argv[1])
url_ = sys.argv[0]

plugin = Common(
    addon=xbmcaddon.Addon(),
    addon_handle=handle_,
    addon_url=url_
)
credential = Credential(plugin)
client = Client(plugin, credential)
parser = Parser(plugin)


def router(paramstring):
    args = dict(parse_qs(paramstring))
    mode = args.get('mode', ['rails'])[0]
    title = args.get('title', [''])[0]
    id_ = args.get('id', ['home'])[0]
    params = args.get('params', [''])[0]
    verify_age = True if args.get('verify_age', [''])[0] == 'True' else False
    plugin.log("params = {0}".format(params))
    if mode == 'rails':
        parser.rails_items(client.rails(id_, params), id_)
    elif 'rail' in mode:
        parser.rail_items(client.rail(id_, params), mode)
Пример #9
0
# -*- coding: utf-8 -*-

import sys
import urlparse
from resources.lib.common import Common
from resources.lib.client import Client
from resources.lib.parser import Parser

handle_ = int(sys.argv[1])
url_ = sys.argv[0]

plugin = Common(addon_handle=handle_, addon_url=url_)
client = Client(plugin)
parser = Parser(plugin)


def router(paramstring):
    args = dict(urlparse.parse_qs(sys.argv[2][1:]))
    mode = args.get('mode', ['root'])[0]
    id_ = args.get('id', [''])[0]
    params = args.get('params', [''])[0]

    if mode == 'root':
        parser.channel(client.channels())
    elif mode == 'sports':
        parser.sport(client.categories())
    elif mode == 'all_sports':
        parser.all_sports(client.category_all())
    elif mode == 'events':
        parser.events(client.events())
    elif mode == 'event':
Пример #10
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import esp
from resources.lib.common import *

client = Client()


def run():
    if mode == 'root':
        esp.channel(client.channels())
    elif mode == 'sports':
        esp.sport(client.categories())
    elif mode == 'videos':
        esp.video(client.videos(id), id)
    elif 'epg' in mode:
        prev_date = params
        date = id
        if date == 'date':
            prev_date, date = get_date()
        esp.epg(client.epg(prev_date, date), prev_date, date)
    elif mode == 'play':
        if id:
            esp.play(client.streams(id))


args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', ['root'])[0]
id = args.get('id', [''])[0]
params = args.get('params', [''])[0]
Пример #11
0
# -*- coding: utf-8 -*-

from resources.lib.client import Client
from resources.lib import esp
from resources.lib import cache
from resources.lib.common import *

client = Client()


def run():
    if mode == 'root':
        esp.channel(client.channels())
    elif mode == 'sports':
        data = client.catchups()
        cache.cache_data(data)
        esp.sport(data)
    elif mode == 'videos':
        esp.video(cache.get_cache_data(), id)
    elif mode == 'epg':
        data = client.epg()
        cache.cache_data(data)
        esp.epg(data)
    elif mode == 'tvschedule':
        esp.tvschedule(cache.get_cache_data(), id)
    elif mode == 'play':
        esp.play(id, client.token())


args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', ['root'])[0]
Пример #12
0
# -*- coding: utf-8 -*-

import sys
import urlparse
from resources.lib.common import Common
from resources.lib.client import Client
from resources.lib.parser import Parser

handle_ = int(sys.argv[1])
url_ = sys.argv[0]

plugin = Common(
    addon_handle=handle_,
    addon_url=url_
)
client = Client(plugin)
parser = Parser(plugin)

def router(paramstring):
    args = dict(urlparse.parse_qs(paramstring))
    mode = args.get('mode', ['rails'])[0]
    title = args.get('title', [''])[0]
    id_ = args.get('id', ['home'])[0]
    params = args.get('params', [''])[0]

    if mode == 'rails':
        parser.rails_items(client.rails(id_, params), id_)
    elif 'rail' in mode:
        parser.rail_items(client.rail(id_, params), mode)
    elif 'epg' in mode:
        date = params