Skip to content

Commit ee47bb4

Browse files
committed
Play rebranding
1 parent f76307f commit ee47bb4

41 files changed

Lines changed: 158 additions & 294 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ check-translations:
2424
check-addon: build
2525
@printf ">>> Running addon checks\n"
2626
$(eval TMPDIR := $(shell mktemp -d))
27-
@unzip dist/plugin.video.goplay-*.zip -d ${TMPDIR}
27+
@unzip dist/plugin.video.play-*.zip -d ${TMPDIR}
2828
cd ${TMPDIR} && kodi-addon-checker --branch=matrix
2929
@rm -rf ${TMPDIR}
3030

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
[![GitHub release](https://img.shields.io/github/v/release/add-ons/plugin.video.goplay?display_name=tag)](https://github.com/add-ons/plugin.video.goplay/releases)
2-
[![Build Status](https://img.shields.io/github/actions/workflow/status/add-ons/plugin.video.goplay/ci.yml?branch=master)](https://github.com/add-ons/plugin.video.goplay/actions?query=branch%3Amaster)
3-
[![Codecov status](https://img.shields.io/codecov/c/github/add-ons/plugin.video.goplay/master)](https://codecov.io/gh/add-ons/plugin.video.goplay/branch/master)
1+
[![GitHub release](https://img.shields.io/github/v/release/add-ons/plugin.video.play?display_name=tag)](https://github.com/add-ons/plugin.video.play/releases)
2+
[![Build Status](https://img.shields.io/github/actions/workflow/status/add-ons/plugin.video.play/ci.yml?branch=master)](https://github.com/add-ons/plugin.video.play/actions?query=branch%3Amaster)
3+
[![Codecov status](https://img.shields.io/codecov/c/github/add-ons/plugin.video.play/master)](https://codecov.io/gh/add-ons/plugin.video.play/branch/master)
44
[![License: GPLv3](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://opensource.org/licenses/GPL-3.0)
5-
[![Contributors](https://img.shields.io/github/contributors/add-ons/plugin.video.goplay.svg)](https://github.com/add-ons/plugin.video.goplay/graphs/contributors)
5+
[![Contributors](https://img.shields.io/github/contributors/add-ons/plugin.video.play.svg)](https://github.com/add-ons/plugin.video.play/graphs/contributors)
66

7-
# GoPlay Kodi add-on
7+
# Play Kodi add-on
88

9-
*plugin.video.goplay* is een Kodi add-on om de video-on-demand content van [GoPlay](https://www.goplay.be/) te bekijken. Hiervoor dien je eerst een
10-
account op [goplay.be](https://www.goplay.be/) aan te maken.
9+
*plugin.video.play* is een Kodi add-on om de video-on-demand content van [Play](https://www.play.tv/) te bekijken. Hiervoor dien je eerst een
10+
account op [play.tv](https://www.play.tv/) aan te maken.
1111

1212
## Features
1313

1414
De volgende features worden ondersteund:
15-
* Bekijk on-demand content van Play4, Play5, Play6, Play7 en Play Crime
15+
* Bekijk on-demand content van Play, Play Fictie, Play Actie, Play Reality en Play Crime
1616
* Doorzoeken van alle programma's
1717

1818
## Screenshots
@@ -26,9 +26,5 @@ De volgende features worden ondersteund:
2626
</table>
2727

2828
## Changelog
29-
## [v0.5.1](https://github.com/add-ons/plugin.video.goplay/tree/v0.5.1) (2024-10-21)
30-
- Fix caching (@mediaminister)
31-
- Add support for external Widevine device (@mediaminister)
32-
33-
## [v0.5.0](https://github.com/add-ons/plugin.video.goplay/tree/v0.5.0) (2024-09-11)
34-
- Update to new GoPlay API (@mediaminister)
29+
## [v0.6.0](https://github.com/add-ons/plugin.video.play/tree/v0.6.0) (2025-10-15)
30+
- Play rebranding (@mediaminister)

addon.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.goplay" name="GoPlay" version="0.5.1" provider-name="mediaminister">
2+
<addon id="plugin.video.play" name="Play" version="0.6.0" provider-name="mediaminister">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.dateutil" version="2.8.1"/>
@@ -13,23 +13,20 @@
1313
</extension>
1414
<extension point="xbmc.service" library="service_entry.py"/>
1515
<extension point="xbmc.addon.metadata">
16-
<summary lang="nl_NL">Bekijk programma's van GoPlay.</summary>
17-
<description lang="nl_NL">Deze add-on geeft toegang tot de programma's die aangeboden worden op Goplay.</description>
16+
<summary lang="nl_NL">Bekijk programma's van Play.</summary>
17+
<description lang="nl_NL">Deze add-on geeft toegang tot de programma's die aangeboden worden op Play.</description>
1818
<disclaimer lang="nl_NL">Deze add-on wordt niet ondersteund door Play Media, en wordt aangeboden 'as is', zonder enige garantie. De logo's zijn eigendom van Play Media.</disclaimer>
19-
<summary lang="en_GB">Watch content from GoPlay.</summary>
20-
<description lang="en_GB">This add-on gives access to video-on-demand content available on GoPlay.</description>
19+
<summary lang="en_GB">Watch content from Play.</summary>
20+
<description lang="en_GB">This add-on gives access to video-on-demand content available on Play.</description>
2121
<disclaimer lang="en_GB">This add-on is not officially commissioned/supported by Play Media and is provided 'as is' without any warranty of any kind. The logos are property of Play Media.</disclaimer>
2222
<platform>all</platform>
2323
<license>GPL-3.0-only</license>
2424
<news>
25-
v0.5.1 (2024-10-21)
26-
- Fix caching
27-
- Add support for external Widevine device
25+
v0.6.0 (2025-10-15)
26+
- Play rebranding
2827

29-
v0.5.0 (2024-09-11)
30-
- Update to new GoPlay API
3128
</news>
32-
<source>https://github.com/add-ons/plugin.video.goplay</source>
29+
<source>https://github.com/add-ons/plugin.video.play</source>
3330
<assets>
3431
<icon>resources/icon.png</icon>
3532
<fanart>resources/fanart.png</fanart>

resources/fanart.png

6.16 KB
Loading

resources/icon.png

6.92 KB
Loading

resources/lib/addon.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,6 @@ def show_search(query=None):
124124
Search().show_search(query)
125125

126126

127-
@routing.route('/play/live/<channel>')
128-
def play_live(channel):
129-
""" Play the requested item """
130-
from resources.lib.modules.player import Player
131-
Player().live(channel)
132-
133-
134127
@routing.route('/play/catalog')
135128
@routing.route('/play/catalog/<uuid>')
136129
@routing.route('/play/catalog/<uuid>/<content_type>')

resources/lib/goplay/__init__.py

Lines changed: 0 additions & 94 deletions
This file was deleted.

resources/lib/modules/catalog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from urllib.parse import unquote_plus
66

77
from resources.lib import kodiutils
8-
from resources.lib.goplay.auth import AuthApi
9-
from resources.lib.goplay.content import CACHE_PREVENT, ContentApi, UnavailableException
8+
from resources.lib.play.auth import AuthApi
9+
from resources.lib.play.content import CACHE_PREVENT, ContentApi, UnavailableException
1010
from resources.lib.modules.menu import Menu
1111

1212
_LOGGER = logging.getLogger(__name__)

resources/lib/modules/channels.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import logging
55

66
from resources.lib import kodiutils
7-
from resources.lib.goplay import STREAM_DICT
8-
from resources.lib.goplay.auth import AuthApi
9-
from resources.lib.goplay.content import ContentApi
7+
from resources.lib.play import STREAM_DICT
8+
from resources.lib.play.auth import AuthApi
9+
from resources.lib.play.content import ContentApi
1010

1111
_LOGGER = logging.getLogger(__name__)
1212

@@ -86,7 +86,7 @@ def show_channel_menu(self, uuid):
8686
listing.append(
8787
kodiutils.TitleItem(
8888
title=kodiutils.localize(30055, channel=channel.title), # Catalog for {channel}
89-
path=kodiutils.url_for('show_channel_catalog', channel=channel.title),
89+
path=kodiutils.url_for('show_channel_catalog', channel=channel.brand.lower()),
9090
art_dict={
9191
'icon': 'DefaultMovieTitle.png',
9292
'fanart': channel.fanart,
@@ -100,7 +100,7 @@ def show_channel_menu(self, uuid):
100100
listing.append(
101101
kodiutils.TitleItem(
102102
title=kodiutils.localize(30052, channel=channel.title), # Watch live {channel}
103-
path=kodiutils.url_for('play_live', channel=channel.uuid) + '?.pvr',
103+
path=kodiutils.url_for('play_catalog', uuid=channel.uuid, content_type='live_channel') + '?.pvr',
104104
art_dict={
105105
'icon': channel.logo,
106106
'fanart': channel.fanart,

resources/lib/modules/iptvmanager.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
from datetime import datetime, timedelta
66

77
from resources.lib import kodiutils
8-
from resources.lib.goplay import CHANNELS
9-
from resources.lib.goplay.epg import EpgApi
8+
from resources.lib.play.auth import AuthApi
9+
from resources.lib.play.content import ContentApi
10+
from resources.lib.play.epg import EpgApi
1011

1112
_LOGGER = logging.getLogger(__name__)
1213

@@ -17,6 +18,8 @@ class IPTVManager:
1718
def __init__(self, port):
1819
"""Initialize IPTV Manager object"""
1920
self.port = port
21+
auth = AuthApi(kodiutils.get_setting('username'), kodiutils.get_setting('password'), kodiutils.get_tokens_path())
22+
self._api = ContentApi(auth, cache_path=kodiutils.get_cache_path())
2023

2124
def via_socket(func): # pylint: disable=no-self-argument
2225
"""Send the output of the wrapped function to socket"""
@@ -28,49 +31,49 @@ def send(self):
2831
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
2932
sock.connect(('127.0.0.1', self.port))
3033
try:
31-
sock.sendall(json.dumps(func()).encode()) # pylint: disable=not-callable
34+
sock.sendall(json.dumps(func(self)).encode()) # pylint: disable=not-callable
3235
finally:
3336
sock.close()
3437

3538
return send
3639

3740
@via_socket
38-
def send_channels(): # pylint: disable=no-method-argument
41+
def send_channels(self): # pylint: disable=no-method-argument
3942
"""Return JSON-STREAMS formatted information to IPTV Manager"""
4043
streams = []
41-
for key, channel in CHANNELS.items():
42-
if channel.get('iptv_id'):
44+
channels = self._api.get_live_channels()
45+
for channel in channels:
46+
if channel.uuid:
4347
streams.append({
44-
'id': channel.get('iptv_id'),
45-
'name': channel.get('name'),
46-
'logo': 'special://home/addons/{addon}/resources/logos/{logo}'.format(addon=kodiutils.addon_id(),
47-
logo=channel.get('logo')),
48-
'preset': channel.get('iptv_preset'),
49-
'stream': 'plugin://plugin.video.goplay/play/live/{channel}'.format(channel=key),
50-
'vod': 'plugin://plugin.video.goplay/play/epg/{channel}/{{date}}'.format(channel=key)
48+
'id': channel.uuid,
49+
'name': channel.title,
50+
'logo': channel.logo,
51+
'stream': 'plugin://plugin.video.play/play/catalog/{uuid}/live_channel'.format(uuid=channel.uuid),
52+
'vod': 'plugin://plugin.video.play/play/epg/{channel}/{{date}}'.format(channel=channel.uuid)
5153
})
5254

5355
return {'version': 1, 'streams': streams}
5456

5557
@via_socket
56-
def send_epg(): # pylint: disable=no-method-argument
58+
def send_epg(self): # pylint: disable=no-method-argument
5759
"""Return JSON-EPG formatted information to IPTV Manager"""
5860
epg_api = EpgApi()
5961

6062
today = datetime.today()
6163

6264
results = {}
63-
for key, channel in CHANNELS.items():
64-
iptv_id = channel.get('iptv_id')
65+
channels = self._api.get_live_channels()
66+
for channel in channels:
67+
uuid = channel.uuid
6568

66-
if channel.get('iptv_id'):
67-
results[iptv_id] = []
69+
if channel.uuid:
70+
results[uuid] = []
6871

6972
for i in range(-3, 7):
7073
date = today + timedelta(days=i)
71-
epg = epg_api.get_epg(key, date.strftime('%Y-%m-%d'))
74+
epg = epg_api.get_epg(channel.title.lower().split()[-1], date.strftime('%Y-%m-%d'))
7275

73-
results[iptv_id].extend([
76+
results[uuid].extend([
7477
{
7578
'start': program.start.isoformat(),
7679
'stop': (program.start + timedelta(seconds=program.duration)).isoformat(),

0 commit comments

Comments
 (0)