Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions args/tiktok.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down
8 changes: 3 additions & 5 deletions args/unmarshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type TikTokJobArguments interface {
JobArguments
ValidateForJobType(jobType types.JobType) error
HasLanguagePreference() bool
GetVideoURL() string
GetLanguageCode() string
}

Expand Down Expand Up @@ -159,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) {
Expand Down
Loading