Skip to content

Commit

Permalink
fix(author-search): 🚸 if all authors are contributors use the first
Browse files Browse the repository at this point in the history
  • Loading branch information
djdembeck committed Oct 15, 2021
1 parent 72f464e commit 988ea27
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Contents/Code/search_tools.py
Expand Up @@ -313,6 +313,15 @@ def validate_author_name(self):
for i, r in enumerate(author_array):
if self.clear_contributor_text(r) != r:
log.debug('Author #' + str(i+1) + ' is a contributor')
# If all authors are contributors use the first
if i == len(author_array) - 1:
log.debug(
'All authors are contributors, using the first one'
)
self.media.artist = self.clear_contributor_text(
author_array[0]
)
return
continue
log.info(
'Merging multi-author "' +
Expand Down

0 comments on commit 988ea27

Please sign in to comment.