def must_login(): return not PluginCache.key_exists( "oespToken") or not PluginCache.key_exists("token")
from resources.lib.Classes.Stream import Stream from resources.lib.Utils.PluginCache import PluginCache from resources.lib.Classes.StreamingFormat import StreamingFormat import random import json import base64 from datetime import datetime, timedelta import time from resources.lib.kodiwrapper import KodiWrapper DEVICE_NAME = "Mijn computer - Google Chrome" DEVICE_CLASS = "other" TOKEN_EXPIRY_GAP_MINUTES = 30 if not PluginCache.key_exists("deviceId"): PluginCache.set_data({ "deviceId": "fe88cd8ace897d72c78441f648a2f92a4e298cced867179932d7c2751d79fb83" }) class BadRequest(object): class KnownErrorCodes: DEVICE_UNREGISTERED = "deviceUnregistered" DEVICE_UNREGISTERED_DEVICE_LIMIT_REACHED = "deviceUnregisteredDeviceLimitReached" def __init__(self, error_type="", code="", reason=""): self.type = error_type self.code = code self.reason = reason