Commitdfcb19b7Recorded25 Mar 2026Repositorysigil-twitch
Fix schedule duration sent as string instead of integer
Message
The Twitch Helix API expects the duration field in schedule segment create/update requests to be a JSON integer (minutes), not a string. Removed the number->string conversion in both twitch-create-segment and twitch-update-segment.
Changed
src/sigil/twitch/schedule.sgl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)Diff
src/sigil/twitch/schedule.sglmodified
@@ -117,7 +117,7 @@
117
is_recurring: (dict-ref opts is-recurring: #f) }) 118
(b (if (dict-ref opts duration: #f) 119
(dict-set b duration:−120
(number->string (dict-ref opts duration:)))+120
(dict-ref opts duration:)) 121
b)) 122
(b (if (dict-ref opts title: #f) 123
(dict-set b title: (dict-ref opts title:))@@ -160,7 +160,7 @@
160
b)) 161
(b (if (dict-ref updates duration: #f) 162
(dict-set b duration:−163
(number->string (dict-ref updates duration:)))+163
(dict-ref updates duration:)) 164
b)) 165
(b (if (dict-ref updates title: #f) 166
(dict-set b title: (dict-ref updates title:))