lghorizon 0.9.1__py3-none-any.whl → 0.9.2__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.
@@ -154,13 +154,11 @@ class LGHorizonDeviceStateProcessor:
154
154
  device_state.season_number = replay_event.season_number
155
155
  device_state.episode_number = replay_event.episode_number
156
156
  device_state.show_title = replay_event.title
157
- now_in_ms = int(time.time() * 1000)
158
-
159
- device_state.last_position_update = int(time.time() * 1000)
157
+ device_state.last_position_update = int(time.time())
160
158
  device_state.start_time = replay_event.start_time
161
159
  device_state.end_time = replay_event.end_time
162
160
  device_state.duration = replay_event.end_time - replay_event.start_time
163
- device_state.position = now_in_ms - int(replay_event.start_time * 1000)
161
+ device_state.position = int(time.time()) - int(replay_event.start_time)
164
162
 
165
163
  # Add random number to url to force refresh
166
164
  join_param = "?"
@@ -200,8 +198,10 @@ class LGHorizonDeviceStateProcessor:
200
198
  device_state.season_number = replay_event.season_number
201
199
  device_state.episode_number = replay_event.episode_number
202
200
  device_state.show_title = replay_event.title
203
- device_state.last_position_update = player_state.last_speed_change_time
204
- device_state.position = player_state.relative_position
201
+ device_state.last_position_update = int(
202
+ player_state.last_speed_change_time / 1000
203
+ )
204
+ device_state.position = int(player_state.relative_position / 1000)
205
205
  device_state.start_time = replay_event.start_time
206
206
  device_state.end_time = replay_event.end_time
207
207
  device_state.duration = replay_event.end_time - replay_event.start_time
@@ -237,22 +237,19 @@ class LGHorizonDeviceStateProcessor:
237
237
  device_state.id = replay_event.event_id
238
238
  # Iets met buffer doen
239
239
  channel = self._channels[replay_event.channel_id]
240
- padding = channel.replay_pre_padding + channel.replay_post_padding
241
240
  device_state.source_type = source.source_type
242
241
  device_state.channel_id = channel.id
243
242
  device_state.episode_title = replay_event.episode_name
244
243
  device_state.season_number = replay_event.season_number
245
244
  device_state.episode_number = replay_event.episode_number
246
245
  device_state.show_title = replay_event.title
247
- device_state.last_position_update = int(time.time() * 1000)
246
+ device_state.last_position_update = int(
247
+ player_state.last_speed_change_time / 1000
248
+ )
248
249
  device_state.start_time = replay_event.start_time
249
250
  device_state.end_time = replay_event.end_time
250
- device_state.duration = (
251
- replay_event.end_time - replay_event.start_time + padding
252
- )
253
- device_state.position = (
254
- player_state.relative_position + channel.replay_pre_padding
255
- )
251
+ device_state.duration = replay_event.end_time - replay_event.start_time
252
+ device_state.position = int(player_state.relative_position / 1000)
256
253
  # Add random number to url to force refresh
257
254
  device_state.image = await self._get_intent_image_url(replay_event.event_id)
258
255
 
@@ -286,8 +283,8 @@ class LGHorizonDeviceStateProcessor:
286
283
  device_state.show_title = vod.title
287
284
 
288
285
  device_state.duration = vod.duration
289
- device_state.last_position_update = int(time.time() * 1000)
290
- device_state.position = player_state.relative_position
286
+ device_state.last_position_update = int(time.time())
287
+ device_state.position = int(player_state.relative_position / 1000)
291
288
 
292
289
  device_state.image = await self._get_intent_image_url(vod.id)
293
290
 
@@ -317,8 +314,10 @@ class LGHorizonDeviceStateProcessor:
317
314
  device_state.episode_title = recording.episode_title
318
315
  device_state.season_number = recording.season_number
319
316
  device_state.episode_number = recording.episode_number
320
- device_state.last_position_update = player_state.last_speed_change_time
321
- device_state.position = player_state.relative_position
317
+ device_state.last_position_update = int(
318
+ player_state.last_speed_change_time / 1000
319
+ )
320
+ device_state.position = int(player_state.relative_position / 1000)
322
321
  if recording.start_time:
323
322
  device_state.start_time = int(
324
323
  dt.fromisoformat(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lghorizon
3
- Version: 0.9.1
3
+ Version: 0.9.2
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
@@ -4,14 +4,14 @@ lghorizon/exceptions.py,sha256=4cnnPRuKBtqXiTlOZK4xmP1WADikk5NvCsy293mijT8,500
4
4
  lghorizon/helpers.py,sha256=SGlEN6V0kh2vqw1qCKmM1KhfeO-UvPyyQmnThgFLFhs,272
5
5
  lghorizon/lghorizon_api.py,sha256=_yP7X3LIei3OPc_byPPZg22QrPkDQdRyMoR6GLg3c3M,12881
6
6
  lghorizon/lghorizon_device.py,sha256=HfpbOnmiN44Y0ObSj-lCP8vYQ85WBYU8rbBaqvDzri8,14767
7
- lghorizon/lghorizon_device_state_processor.py,sha256=LW_Gavhg7bSSeZJiprAi1YJqOcUhZcB-2GdHn9hMj-o,15380
7
+ lghorizon/lghorizon_device_state_processor.py,sha256=woPiVMEfN_U3hKeIJszDnslkFnAkM2n1wjdepiZthwM,15321
8
8
  lghorizon/lghorizon_message_factory.py,sha256=BkJrVgcTsidcugrM9Pt5brvdw5_WI4PRAHvWQyHurz8,1435
9
9
  lghorizon/lghorizon_models.py,sha256=-xhTIz1UC5efR5HJtXf2a59EspDbZKGp967flYvhryM,46435
10
10
  lghorizon/lghorizon_mqtt_client.py,sha256=e1gyaF0awyVyQZRdJHyZmYcY9omlWnoUwVrvQ5CdMtY,12769
11
11
  lghorizon/lghorizon_recording_factory.py,sha256=JaFjmXWChp1jdFzkioe9K-MqzVU0AsOgdKGjm2Seyq0,2318
12
12
  lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- lghorizon-0.9.1.dist-info/licenses/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
14
- lghorizon-0.9.1.dist-info/METADATA,sha256=OOtLMZiWEW9gqy5kaRVlnbTzfdObTgASQ2HIz5m0u60,7453
15
- lghorizon-0.9.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
16
- lghorizon-0.9.1.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
17
- lghorizon-0.9.1.dist-info/RECORD,,
13
+ lghorizon-0.9.2.dist-info/licenses/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
14
+ lghorizon-0.9.2.dist-info/METADATA,sha256=0IB4Am-nfWTG8ch2QlmcRuFXWd3nRRkhB7bVhv8rQeo,7453
15
+ lghorizon-0.9.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
16
+ lghorizon-0.9.2.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
17
+ lghorizon-0.9.2.dist-info/RECORD,,