lghorizon 0.7.4__py3-none-any.whl → 0.7.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lghorizon/const.py CHANGED
@@ -73,13 +73,11 @@ COUNTRY_SETTINGS = {
73
73
  },
74
74
  "ch": {
75
75
  "api_url": "https://spark-prod-ch.gnp.cloud.sunrisetv.ch",
76
- "use_oauth": False,
77
76
  "channels": [],
78
77
  "language": "de",
79
78
  },
80
79
  "be-nl": {
81
80
  "api_url": "https://spark-prod-be.gnp.cloud.telenet.tv",
82
- "use_oauth": True,
83
81
  "oauth_username_fieldname": "j_username",
84
82
  "oauth_password_fieldname": "j_password",
85
83
  "oauth_add_accept_header": False,
@@ -90,8 +90,10 @@ class LGHorizonApi:
90
90
  ctry_code = self._country_code[0:2]
91
91
  if ctry_code == "be":
92
92
  self.authorize_telenet()
93
- elif ctry_code == "gb":
94
- self.authorize_gb()
93
+ elif ctry_code in ("gb", "ch"):
94
+ self.authorize_with_refreshtoken()
95
+ # elif ctry_code == "ch":
96
+ # self.authorize_sunrise()
95
97
  else:
96
98
  self._authorize_default()
97
99
 
@@ -122,7 +124,7 @@ class LGHorizonApi:
122
124
  self._auth.fill(auth_response.json())
123
125
  _logger.debug("Authorization succeeded")
124
126
 
125
- def authorize_gb(self) -> None:
127
+ def authorize_with_refreshtoken(self) -> None:
126
128
  _logger.debug("Authorizing via refresh")
127
129
  refresh_url = (
128
130
  f"{self._country_settings['api_url']}/auth-service/v1/authorization/refresh"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lghorizon
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: Python client for Liberty Global Horizon settop boxes
5
5
  Home-page: https://github.com/sholofly/LGHorizon-python
6
6
  Author: Rudolf Offereins
@@ -0,0 +1,12 @@
1
+ lghorizon/__init__.py,sha256=XqePG0hj8NnudOcfCtEWqPsWP5l2headzrQhkfuDlv8,544
2
+ lghorizon/const.py,sha256=8P-4cwRRg0wKtrzr5DTOuGb618HKjGRPMnIfmc6-VSM,4700
3
+ lghorizon/exceptions.py,sha256=-6v55KDTogBldGAg1wV9Mrxm5L5BsaVguhBgVMOeJHk,404
4
+ lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
5
+ lghorizon/lghorizon_api.py,sha256=ZrHHp-fSYLs566_KKi10n52P6T4vlaRyPh50UJqZWno,21993
6
+ lghorizon/models.py,sha256=S_Pq8z9PpaN10b17aoi2j-mCIdZf-TK411pBGRPDkvc,24542
7
+ lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ lghorizon-0.7.5.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
9
+ lghorizon-0.7.5.dist-info/METADATA,sha256=G3NeWJ5x9IJ84VKfO4GUhduDCJlleYYAdPAFX9jxwm8,1037
10
+ lghorizon-0.7.5.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
11
+ lghorizon-0.7.5.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
12
+ lghorizon-0.7.5.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- lghorizon/__init__.py,sha256=XqePG0hj8NnudOcfCtEWqPsWP5l2headzrQhkfuDlv8,544
2
- lghorizon/const.py,sha256=S8UWatG7JPCqd1zk-iOoILTvFDEj7YhLcEXxLGhyJXs,4755
3
- lghorizon/exceptions.py,sha256=-6v55KDTogBldGAg1wV9Mrxm5L5BsaVguhBgVMOeJHk,404
4
- lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
5
- lghorizon/lghorizon_api.py,sha256=D0nWWQ1R7DMkOQ7BkoWigjr1ivx57Uj08N7hZderBSM,21874
6
- lghorizon/models.py,sha256=S_Pq8z9PpaN10b17aoi2j-mCIdZf-TK411pBGRPDkvc,24542
7
- lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- lghorizon-0.7.4.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
9
- lghorizon-0.7.4.dist-info/METADATA,sha256=uv22YHR5QJwow7kXSYYhzz6OU9bqkz3WcG8YKmm-0OA,1037
10
- lghorizon-0.7.4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
11
- lghorizon-0.7.4.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
12
- lghorizon-0.7.4.dist-info/RECORD,,