From b8bfa5fe2247e8dd923c99e088fab2e418c06905 Mon Sep 17 00:00:00 2001 From: grantdfoster Date: Tue, 12 Aug 2025 02:51:29 +0200 Subject: [PATCH 1/2] fix: video url getter on tiktok tee types --- args/tiktok.go | 5 +++++ args/unmarshaller.go | 1 + 2 files changed, 6 insertions(+) diff --git a/args/tiktok.go b/args/tiktok.go index dd68e6f..cfe60fc 100644 --- a/args/tiktok.go +++ b/args/tiktok.go @@ -75,6 +75,11 @@ func (t *TikTokTranscriptionArguments) HasLanguagePreference() bool { return t.Language != "" } +// GetVideoURL returns the source video URL +func (t *TikTokTranscriptionArguments) GetVideoURL() string { + return t.VideoURL +} + // GetLanguageCode returns the language code, defaulting to "en-us" if not specified func (t *TikTokTranscriptionArguments) GetLanguageCode() string { if t.Language == "" { diff --git a/args/unmarshaller.go b/args/unmarshaller.go index e7adf95..f8d0319 100644 --- a/args/unmarshaller.go +++ b/args/unmarshaller.go @@ -39,6 +39,7 @@ type TikTokJobArguments interface { JobArguments ValidateForJobType(jobType types.JobType) error HasLanguagePreference() bool + GetVideoURL() string GetLanguageCode() string } From 482839a9a84112d4012d1cdcdb1eaeb6a8c473fe Mon Sep 17 00:00:00 2001 From: grantdfoster Date: Tue, 12 Aug 2025 03:04:32 +0200 Subject: [PATCH 2/2] fix: web unmarshaller --- args/unmarshaller.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/args/unmarshaller.go b/args/unmarshaller.go index f8d0319..353bf8f 100644 --- a/args/unmarshaller.go +++ b/args/unmarshaller.go @@ -160,12 +160,9 @@ func (t *TelemetryJobArguments) GetCapability() types.Capability { } // Type assertion helpers -func AsWebArguments(args JobArguments) (WebJobArguments, bool) { +func AsWebArguments(args JobArguments) (*WebSearchArguments, bool) { webArgs, ok := args.(*WebSearchArguments) - if !ok { - return nil, false - } - return webArgs, true + return webArgs, ok } func AsTwitterArguments(args JobArguments) (TwitterJobArguments, bool) {