mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix identify nil dereference (#4171)
This commit is contained in:
@@ -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
|
// Returns a MetadataOptions object with any default options overwritten by source specific options
|
||||||
func (t *SceneIdentifier) getOptions(source ScraperSource) MetadataOptions {
|
func (t *SceneIdentifier) getOptions(source ScraperSource) MetadataOptions {
|
||||||
options := *t.DefaultOptions
|
var options MetadataOptions
|
||||||
|
if t.DefaultOptions != nil {
|
||||||
|
options = *t.DefaultOptions
|
||||||
|
}
|
||||||
if source.Options == nil {
|
if source.Options == nil {
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
if source.Options.SetCoverImage != nil {
|
if source.Options.SetCoverImage != nil {
|
||||||
options.SetCoverImage = source.Options.SetCoverImage
|
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 {
|
if source.Options.SkipSingleNamePerformerTag != nil && len(*source.Options.SkipSingleNamePerformerTag) > 0 {
|
||||||
options.SkipSingleNamePerformerTag = source.Options.SkipSingleNamePerformerTag
|
options.SkipSingleNamePerformerTag = source.Options.SkipSingleNamePerformerTag
|
||||||
}
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user