Skip to content

Commit c059bdb

Browse files
committed
Ensure Python lower 3.10 compatibility (#59)
1 parent 6c25177 commit c059bdb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

script.service.hyperion/addon.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.service.hyperion" name="Hyperion Ambilight" version="20.0.1" provider-name="hyperion-project">
2+
<addon id="script.service.hyperion" name="Hyperion Ambilight" version="20.0.2" provider-name="hyperion-project">
33
<requires>
44
<import addon="xbmc.addon" version="20.0.0"/>
55
<import addon="xbmc.python" version="3.0.1"/>
@@ -20,6 +20,8 @@
2020
<source>https://github.com/hyperion-project/hyperion.kodi</source>
2121
<license>MIT</license>
2222
<news>
23+
20.0.2
24+
- Python lower than 3.10 compatibility
2325
20.0.1
2426
- Clean-ups
2527
- Handle missing PIL library on Android

script.service.hyperion/resources/lib/monitor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Kodi video capturer for Hyperion.
33
4-
Copyright (c) 2013-2023 Hyperion Team
4+
Copyright (c) 2013-2024 Hyperion Team
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal
@@ -22,6 +22,7 @@
2222
THE SOFTWARE.
2323
"""
2424
from typing import Callable
25+
from typing import Tuple
2526

2627
import xbmc
2728
from PIL import Image
@@ -114,7 +115,7 @@ def connect(self) -> None:
114115
self._hyperion = Hyperion(settings.address, settings.port)
115116
self._capture = xbmc.RenderCapture()
116117

117-
def get_capture_size(self) -> tuple[tuple[int, int], int]:
118+
def get_capture_size(self) -> Tuple[Tuple[int, int], int]:
118119
width = self.settings.capture_width
119120
aspect_ratio = self._capture.getAspectRatio()
120121
height = int(width / aspect_ratio)

0 commit comments

Comments
 (0)