2020-03-19 16:45:31 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2021-02-01 08:53:13 +01:00
|
|
|
""" GoPlay API """
|
2020-03-19 16:45:31 +01:00
|
|
|
from __future__ import absolute_import, division, unicode_literals
|
|
|
|
|
|
|
|
from collections import OrderedDict
|
|
|
|
|
|
|
|
CHANNELS = OrderedDict([
|
2021-02-01 08:53:13 +01:00
|
|
|
('Play4', dict(
|
|
|
|
name='Play4',
|
|
|
|
epg_id='vier',
|
|
|
|
logo='play4.png',
|
|
|
|
background='play4-background.png',
|
2020-05-25 20:41:38 +02:00
|
|
|
iptv_preset=4,
|
2021-02-01 08:53:13 +01:00
|
|
|
iptv_id='play4.be',
|
2020-03-19 16:45:31 +01:00
|
|
|
youtube=[
|
|
|
|
dict(
|
2021-02-01 08:53:13 +01:00
|
|
|
label='GoPlay',
|
|
|
|
logo='goplay.png',
|
2020-03-19 16:45:31 +01:00
|
|
|
path='plugin://plugin.video.youtube/user/viertv/',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
2021-02-01 08:53:13 +01:00
|
|
|
('Play5', dict(
|
|
|
|
name='Play5',
|
|
|
|
epg_id='vijf',
|
|
|
|
logo='play5.png',
|
|
|
|
background='play5-background.png',
|
2020-05-25 20:41:38 +02:00
|
|
|
iptv_preset=5,
|
2021-02-01 08:53:13 +01:00
|
|
|
iptv_id='play5.be',
|
2020-03-19 16:45:31 +01:00
|
|
|
youtube=[
|
|
|
|
dict(
|
2021-02-01 08:53:13 +01:00
|
|
|
label='GoPlay',
|
|
|
|
logo='goplay.png',
|
2020-03-19 16:45:31 +01:00
|
|
|
path='plugin://plugin.video.youtube/user/viertv/',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
2021-02-01 08:53:13 +01:00
|
|
|
('Play6', dict(
|
|
|
|
name='Play6',
|
|
|
|
epg_id='zes',
|
|
|
|
logo='play6.png',
|
|
|
|
background='play6-background.png',
|
2020-05-25 20:41:38 +02:00
|
|
|
iptv_preset=6,
|
2021-02-01 08:53:13 +01:00
|
|
|
iptv_id='play6.be',
|
|
|
|
youtube=[
|
|
|
|
dict(
|
|
|
|
label='GoPlay',
|
|
|
|
logo='goplay.png',
|
|
|
|
path='plugin://plugin.video.youtube/user/viertv/',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
2021-04-06 18:07:15 +02:00
|
|
|
('Play7', dict(
|
|
|
|
name='Play7',
|
|
|
|
epg_id='zeven',
|
|
|
|
url='https://www.goplay.be',
|
|
|
|
logo='play7.png',
|
|
|
|
background='play7-background.png',
|
|
|
|
iptv_preset=17,
|
|
|
|
iptv_id='play7.be',
|
|
|
|
youtube=[],
|
|
|
|
)),
|
2021-02-01 08:53:13 +01:00
|
|
|
('GoPlay', dict(
|
|
|
|
name='Go Play',
|
|
|
|
url='https://www.goplay.be',
|
|
|
|
logo='goplay.png',
|
|
|
|
background='goplay-background.png',
|
2020-03-19 16:45:31 +01:00
|
|
|
youtube=[],
|
|
|
|
))
|
|
|
|
])
|
|
|
|
|
|
|
|
STREAM_DICT = {
|
|
|
|
'codec': 'h264',
|
2020-03-22 10:39:49 +01:00
|
|
|
'height': 544,
|
|
|
|
'width': 960,
|
2020-03-19 16:45:31 +01:00
|
|
|
}
|
2020-11-04 12:48:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ResolvedStream:
|
|
|
|
""" Defines a stream that we can play"""
|
|
|
|
|
|
|
|
def __init__(self, uuid=None, url=None, stream_type=None, license_url=None, auth=None):
|
|
|
|
"""
|
|
|
|
:type uuid: str
|
|
|
|
:type url: str
|
|
|
|
:type stream_type: str
|
|
|
|
:type license_url: str
|
|
|
|
:type auth: str
|
|
|
|
"""
|
|
|
|
self.uuid = uuid
|
|
|
|
self.url = url
|
|
|
|
self.stream_type = stream_type
|
|
|
|
self.license_url = license_url
|
|
|
|
self.auth = auth
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return "%r" % self.__dict__
|