We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a7c77c commit 009360fCopy full SHA for 009360f
src/livestreamer/plugins/twitch.py
@@ -12,9 +12,10 @@
12
13
14
def time_to_offset(t):
15
- match = re.match(r"((?P<minutes>\d+)m)?((?P<seconds>\d+)s)?", t)
+ match = re.match(r"((?P<hours>\d+)h)?((?P<minutes>\d+)m)?((?P<seconds>\d+)s)?", t)
16
if match:
17
- offset = int(match.group("minutes") or "0") * 60
+ offset = int(match.group("hours") or "0") * 60 * 60
18
+ offset += int(match.group("minutes") or "0") * 60
19
offset += int(match.group("seconds") or "0")
20
else:
21
offset = 0
0 commit comments