Skip to content

Commit 89f98af

Browse files
authored
[script.timers] 4.1.1 (#2718)
1 parent c26521e commit 89f98af

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

script.timers/addon.xml

Lines changed: 4 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.timers" name="Timers" version="4.1.0" provider-name="Heckie">
2+
<addon id="script.timers" name="Timers" version="4.1.1" provider-name="Heckie">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0" />
55
</requires>
@@ -66,6 +66,9 @@
6666
<website>https://github.com/Heckie75/kodi-addon-timers</website>
6767
<source>https://github.com/Heckie75/kodi-addon-timers</source>
6868
<news>
69+
v4.1.1 (2025-03-24)
70+
* Minor fixes for Python compatibility
71+
6972
v4.1.0 (2024-12-19)
7073
* New feature: support for smart playlists (music and video)
7174

script.timers/resources/lib/utils/datetime_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ def parse_time(s_time: str, i_day=0) -> timedelta:
161161
if s_time == "":
162162
s_time = DEFAULT_TIME
163163

164-
m = re.match("^(\d{1,2}):(\d{1,2})( am)?( pm)?$", s_time.lower())
164+
m = re.match(r"^(\d{1,2}):(\d{1,2})( am)?( pm)?$", s_time.lower())
165165
if not m:
166166
return None
167167

168168
tm_hour = int(m.groups()[0])
169-
if m.groups()[2] and tm_hour >= 12: # am:
169+
if m.groups()[2] and tm_hour >= 12: # am:
170170
tm_hour -= 12
171-
elif m.groups()[3] and tm_hour < 12: # pm
171+
elif m.groups()[3] and tm_hour < 12: # pm
172172
tm_hour += 12
173173

174174
tm_min = int(m.groups()[1])

script.timers/resources/lib/utils/vfs_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
from resources.lib.player.mediatype import AUDIO, PICTURE, TYPES, VIDEO
99
from resources.lib.player.playlist import PlayList
1010

11-
_PVR_CHANNELS_MATCHER = "^pvr://channels/.*\.pvr$"
12-
_PVR_TV_CHANNELS_MATCHER = "^pvr://channels/tv/.*\.pvr$"
13-
_PVR_RADIO_CHANNELS_MATCHER = "^pvr://channels/radio/.*\.pvr$"
14-
_PVR_RECORDINGS_MATCHER = "^pvr://recordings/.*\.pvr$"
11+
_PVR_CHANNELS_MATCHER = r"^pvr://channels/.*\.pvr$"
12+
_PVR_TV_CHANNELS_MATCHER = r"^pvr://channels/tv/.*\.pvr$"
13+
_PVR_RADIO_CHANNELS_MATCHER = r"^pvr://channels/radio/.*\.pvr$"
14+
_PVR_RECORDINGS_MATCHER = r"^pvr://recordings/.*\.pvr$"
1515
_PVR_PREFIX = "pvr://"
1616
_MUSIC_DB_PREFIX = "musicdb://"
1717
_VIDEO_DB_PREFIX = "videodb://"
1818
_AUDIO_PLUGIN_PREFIX = "plugin://plugin.audio."
1919
_VIDEO_PLUGIN_PREFIX = "plugin://plugin.video."
2020
_URI_MATCHER = "^[a-z]+://.+$"
21-
_FAVOURITES_MATCHER = "^favourites://(PlayMedia|RunScript)\(%22(.+)%22\)/?$"
22-
_SCRIPT_MATCHER = "^((script|plugin)://)?script\..+$"
21+
_FAVOURITES_MATCHER = r"^favourites://(PlayMedia|RunScript)\(%22(.+)%22\)/?$"
22+
_SCRIPT_MATCHER = r"^((script|plugin)://)?script\..+$"
2323

2424
_PLAYLIST_TYPES = [".m3u", ".m3u8", ".pls"]
2525

@@ -158,7 +158,7 @@ def get_file_name(path: str) -> str:
158158
if path.endswith("/"):
159159
return None
160160

161-
m = re.match("^.*/([^/.]+)(\.[^\.]+)?$", "/%s" % path)
161+
m = re.match(r"^.*/([^/.]+)(\.[^\.]+)?$", "/%s" % path)
162162
if not m:
163163
return None
164164

@@ -168,7 +168,7 @@ def get_file_name(path: str) -> str:
168168

169169
def get_file_extension(path: str) -> str:
170170

171-
m = re.match("^.+(\.[^\.]+)$", path.lower())
171+
m = re.match(r"^.+(\.[^\.]+)$", path.lower())
172172
if not m:
173173
return None
174174

0 commit comments

Comments
 (0)