From e614ca8d26e75cf97c40bc42224b50e8503bacf0 Mon Sep 17 00:00:00 2001 From: JackDawson94 <100418085+JackDawson94@users.noreply.github.com> Date: Thu, 1 Dec 2022 04:06:29 +0100 Subject: [PATCH] Performer Active Years is submitted to Stashbox (#3146) --- pkg/scraper/stashbox/stash_box.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/scraper/stashbox/stash_box.go b/pkg/scraper/stashbox/stash_box.go index 4206d300e..4a5b8712b 100644 --- a/pkg/scraper/stashbox/stash_box.go +++ b/pkg/scraper/stashbox/stash_box.go @@ -1027,6 +1027,17 @@ func (c Client) SubmitPerformerDraft(ctx context.Context, performer *models.Perf aliases := strings.Join(performer.Aliases.List(), ",") draft.Aliases = &aliases } + if performer.CareerLength != "" { + var career = strings.Split(performer.CareerLength, "-") + if i, err := strconv.Atoi(strings.TrimSpace(career[0])); err == nil { + draft.CareerStartYear = &i + } + if len(career) == 2 { + if y, err := strconv.Atoi(strings.TrimSpace(career[1])); err == nil { + draft.CareerEndYear = &y + } + } + } var urls []string if len(strings.TrimSpace(performer.Twitter)) > 0 {