Add Studio Code and Photographer to Galleries. (#4195)

* Added Studio Code and Photographer to Galleries
* Fix gallery display on mobile
* Fixed potential panic when scraping with a bad configuration
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
bob123491234
2023-11-27 22:05:33 -06:00
committed by GitHub
parent b78771dbcd
commit d1018b4c5d
25 changed files with 243 additions and 102 deletions

View File

@@ -972,11 +972,12 @@ func (s mappedScraper) scrapeScenes(ctx context.Context, q mappedQuery) ([]*Scra
func (s mappedScraper) scrapeScene(ctx context.Context, q mappedQuery) (*ScrapedScene, error) {
sceneScraperConfig := s.Scene
sceneMap := sceneScraperConfig.mappedConfig
if sceneMap == nil {
if sceneScraperConfig == nil {
return nil, nil
}
sceneMap := sceneScraperConfig.mappedConfig
logger.Debug(`Processing scene:`)
results := sceneMap.process(ctx, q, s.Common)
@@ -1000,11 +1001,12 @@ func (s mappedScraper) scrapeGallery(ctx context.Context, q mappedQuery) (*Scrap
var ret ScrapedGallery
galleryScraperConfig := s.Gallery
galleryMap := galleryScraperConfig.mappedConfig
if galleryMap == nil {
if galleryScraperConfig == nil {
return nil, nil
}
galleryMap := galleryScraperConfig.mappedConfig
galleryPerformersMap := galleryScraperConfig.Performers
galleryTagsMap := galleryScraperConfig.Tags
galleryStudioMap := galleryScraperConfig.Studio
@@ -1062,11 +1064,12 @@ func (s mappedScraper) scrapeMovie(ctx context.Context, q mappedQuery) (*models.
var ret models.ScrapedMovie
movieScraperConfig := s.Movie
movieMap := movieScraperConfig.mappedConfig
if movieMap == nil {
if movieScraperConfig == nil {
return nil, nil
}
movieMap := movieScraperConfig.mappedConfig
movieStudioMap := movieScraperConfig.Studio
results := movieMap.process(ctx, q, s.Common)