Skip to content

Commit

Permalink
Added: Initial VideoLand stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
basrieter committed Nov 18, 2023
1 parent 8927333 commit 175e724
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
35 changes: 35 additions & 0 deletions channels/channel.videoland/videolandnl/chn_videolandnl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"channels": [
{
"guid": "C5182B93-6B71-44BE-948F-0B74E6C2BAA6",
"name": "Videoland",
"description": {
"en": "Broadcasts of Videoland.",
"nl": "Uitzendingen van Videoland."
},
"icon": "videoland.png",
"category": "National",
"sortorder": 4,
"language": "nl",
"fanart": "videolandfanart.png",
"poster": "videolandposter.png"
}
],
"settings": [
{
"order": 1,
"value": "type=\"text\" label=\"30094\" default=\"\"",
"id": "videolandnl_username"
},
{
"order": 2,
"value": "default=\"\"",
"id": "videolandnl_password"
},
{
"order": 3,
"value": "label=\"30093\" type=\"action\" action=\"RunScript(plugin.video.retrospect, 0, ?action=encryptsetting&settingid=channel_C5182B93-6B71-44BE-948F-0B74E6C2BAA6_videolandnl_password&settingname=Videoland&tabfocus=102)\" option=\"close\"",
"id": "videolandnl_password_set"
}
]
}
56 changes: 56 additions & 0 deletions channels/channel.videoland/videolandnl/chn_videolandnl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: GPL-3.0-or-later

import datetime
from typing import Dict, Union, Any, Optional, List

import pytz

from resources.lib import chn_class
from resources.lib import contenttype
from resources.lib import mediatype
from resources.lib.authentication.authenticator import Authenticator
from resources.lib.authentication.rtlxlhandler import RtlXlHandler
from resources.lib.helpers.datehelper import DateHelper
from resources.lib.helpers.jsonhelper import JsonHelper
from resources.lib.helpers.languagehelper import LanguageHelper
from resources.lib.logger import Logger
from resources.lib.mediaitem import FolderItem
from resources.lib.mediaitem import MediaItem
from resources.lib.parserdata import ParserData
from resources.lib.urihandler import UriHandler
from resources.lib.xbmcwrapper import XbmcWrapper


class Channel(chn_class.Channel):
def __init__(self, channel_info):
""" Initialisation of the class.
All class variables should be instantiated here and this method should not
be overridden by any derived classes.
:param ChannelInfo channel_info: The channel info object to base this channel on.
"""

chn_class.Channel.__init__(self, channel_info)

# ============== Actual channel setup STARTS here and should be overwritten from derived classes ===============
self.noImage = "videolandimage.png"
self.poster = "videolandposter.png"

# setup the urls
self.mainListUri = "https://layout.videoland.bedrock.tech/front/v1/rtlnl/m6group_web/main/token-web-4/alias/home/layout?nbPages=2"

#===============================================================================================================
# non standard items
self.__ignore_cookie_law()
self.__timezone = pytz.timezone("Europe/Amsterdam")

def __ignore_cookie_law(self):
""" Accepts the cookies from RTL channel in order to have the site available """

Logger.info("Setting the Cookie-Consent cookie for www.uitzendinggemist.nl")

# the rfc2109 parameters is not valid in Python 2.4 (Xbox), so we ommit it.
UriHandler.set_cookie(name='rtlcookieconsent', value='yes', domain='.www.rtl.nl')
return

0 comments on commit 175e724

Please sign in to comment.