Skip to content

Commit

Permalink
Fix identify nil dereference (stashapp#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
DingDongSoLong4 authored Oct 6, 2023
1 parent 7894d0f commit 65fa81b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/identify/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}

Expand Down

0 comments on commit 65fa81b

Please sign in to comment.