From c55a09cb01a8db16318d4378c21c7fa6c6fb8b7a Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:41:23 +0200 Subject: [PATCH] Fix identify nil dereference --- internal/identify/identify.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/identify/identify.go b/internal/identify/identify.go index db8ca2f54ab..86a73c009bb 100644 --- a/internal/identify/identify.go +++ b/internal/identify/identify.go @@ -126,10 +126,14 @@ func (t *SceneIdentifier) scrapeScene(ctx context.Context, txnManager txn.Manage // Returns a MetadataOptions object with any default options overwritten by source specific options func (t *SceneIdentifier) getOptions(source ScraperSource) MetadataOptions { - options := *t.DefaultOptions + var options MetadataOptions + if t.DefaultOptions != nil { + options = *t.DefaultOptions + } if source.Options == nil { return options } + if source.Options.SetCoverImage != nil { options.SetCoverImage = source.Options.SetCoverImage } @@ -151,6 +155,7 @@ func (t *SceneIdentifier) getOptions(source ScraperSource) MetadataOptions { if source.Options.SkipSingleNamePerformerTag != nil && len(*source.Options.SkipSingleNamePerformerTag) > 0 { options.SkipSingleNamePerformerTag = source.Options.SkipSingleNamePerformerTag } + return options }