фикс парсинга времени

- исправлен парсинг времени если передается без запятой
This commit is contained in:
Capybara-z
2025-02-18 14:31:43 +03:00
committed by GitHub
parent 316bd191a2
commit 8b159ab75d
+1 -1
View File
@@ -161,7 +161,7 @@ async def handle_subscription(request, old_subscription=False):
candidate = parts[-1] if parts else ""
candidate_decoded = urllib.parse.unquote(candidate)
# Ищем формат "11D,1H", либо "1H"
m = re.search(r'(?:(\d+)D,)?(\d+)H', candidate_decoded)
m = re.search(r'(?:(\d+)D,?)?(\d+)H', candidate_decoded)
if m:
d = int(m.group(1)) if m.group(1) else 0
h = int(m.group(2))