From 88c9b47e3ba4ae0a834da05253b528b9813fe66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Lavaud-Wernert?= Date: Wed, 15 Jan 2025 13:43:00 +0100 Subject: [PATCH] 2.3.3 --- CHANGELOG.md | 9 +++++++++ addon.xml | 2 +- resources/lib/providers/abstract_orange_provider.py | 13 +------------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 931e13a..ced1e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # 2.x +## [2.3.3](https://github.com/f-lawe/plugin.video.orange.fr/releases/tag/v2.3.3) - 2025-01-15 + +### Changed +- Miscellaneous code improvements and cleaning + +### Fixed +- Detection by IPTV Manager ([#73](https://github.com/f-lawe/plugin.video.orange.fr/issues/73)) +- Authentication to Orange servers ([#74](https://github.com/f-lawe/plugin.video.orange.fr/issues/74)) + ## [2.3.2](https://github.com/f-lawe/plugin.video.orange.fr/releases/tag/v2.3.2) - 2024-12-05 ### Changed diff --git a/addon.xml b/addon.xml index c7f61a8..254c486 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/resources/lib/providers/abstract_orange_provider.py b/resources/lib/providers/abstract_orange_provider.py index 95051bc..0aef1b0 100644 --- a/resources/lib/providers/abstract_orange_provider.py +++ b/resources/lib/providers/abstract_orange_provider.py @@ -1,6 +1,7 @@ # ruff: noqa: D102 """Orange provider template.""" +import json import re from abc import ABC from datetime import date, datetime, timedelta @@ -30,7 +31,6 @@ _LIVE_HOMEPAGE_URL = "https://chaines-tv.orange.fr/" _CATCHUP_VIDEO_URL = "https://replay.orange.fr/videos/{stream_id}" _LOGIN_URL = "https://login.orange.fr" -_LOGIN_URL = "https://login.orange.fr" class AbstractOrangeProvider(AbstractProvider, ABC): @@ -259,20 +259,9 @@ def _retrieve_auth_data(self, auth_url: str, login: str = None, password: str = tv_token, tv_token_expires, wassup = ( provider_session_data.get(k) for k in ("tv_token", "tv_token_expires", "wassup") ) - tv_token, tv_token_expires, wassup = ( - provider_session_data.get(k) for k in ("tv_token", "tv_token_expires", "wassup") - ) if not tv_token_expires or datetime.utcnow().timestamp() > tv_token_expires: - URL_ROOT = "https://chaines-tv.orange.fr" - USER_AGENT_FIREFOX = "Mozilla/5.0 (Windows NT 10.0; rv:114.0) Gecko/20100101 Firefox/114.0" session = Session() - session.headers = { - "User-Agent": USER_AGENT_FIREFOX, - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3", - "Accept-Encoding": "gzip, deflate, br", - } if not self._is_wassup_expired(wassup): log("Cookie reuse", xbmc.LOGINFO)