Skip to content

Commit 20e94fe

Browse files
author
Tom Softreck
committed
update
1 parent 675eefb commit 20e94fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dialogchain/engine.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ def create_source(self, uri: str):
143143
if scheme == 'rtsp':
144144
return RTSPSource(uri)
145145
elif scheme == 'timer':
146-
interval = parsed.path.rstrip('/')
146+
# For timer URIs, the interval can be in either the netloc or path
147+
# e.g., timer:5s, timer://5s, or timer:/5s
148+
interval = parsed.netloc or parsed.path.lstrip('/')
149+
if not interval:
150+
raise ValueError(f"No interval specified in timer URI: {uri}")
147151
return TimerSource(interval)
148152
elif scheme == 'grpc':
149153
return GRPCSource(uri)

0 commit comments

Comments
 (0)