Skip to content

Commit

Permalink
fix(album-update): ♻️ add 'Book' prefix to series position due to ups…
Browse files Browse the repository at this point in the history
…tream change
  • Loading branch information
djdembeck committed Nov 22, 2021
1 parent fef63b6 commit bcb9a6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Contents/Code/update_tools.py
Expand Up @@ -40,11 +40,15 @@ def parse_api_response(self, response):
if 'seriesPrimary' in response:
self.series = response['seriesPrimary']['name']
if 'position' in response['seriesPrimary']:
self.volume = response['seriesPrimary']['position']
self.volume = self.volume_prefix(
response['seriesPrimary']['position']
)
if 'seriesSecondary' in response:
self.series2 = response['seriesSecondary']['name']
if 'position' in response['seriesSecondary']:
self.volume2 = response['seriesSecondary']['position']
self.volume2 = self.volume_prefix(
response['seriesSecondary']['position']
)
if 'publisherName' in response:
self.studio = response['publisherName']
if 'summary' in response:
Expand All @@ -56,6 +60,10 @@ def parse_api_response(self, response):
if 'title' in response:
self.title = response['title']

def volume_prefix(self, string):
prefixed_string = ('Book ' + string)
return prefixed_string

# Writes metadata information to log.
def writeInfo(self):
log.separator(
Expand Down

0 comments on commit bcb9a6a

Please sign in to comment.