fixed a python3 issue and made default image not required when parsing a comic file

This commit is contained in:
Iris Wildthyme 2019-04-02 18:27:24 -04:00
parent ab50622906
commit adb7cffa64
2 changed files with 5 additions and 3 deletions

View File

@ -675,7 +675,7 @@ class ComicArchive:
self.archive_type = self.ArchiveType.Pdf self.archive_type = self.ArchiveType.Pdf
self.archiver = PdfArchiver(self.path) self.archiver = PdfArchiver(self.path)
if ComicArchive.logo_data is None: if ComicArchive.logo_data is None and self.default_image_path:
#fname = ComicTaggerSettings.getGraphic('nocover.png') #fname = ComicTaggerSettings.getGraphic('nocover.png')
fname = self.default_image_path fname = self.default_image_path
with open(fname, 'rb') as fd: with open(fname, 'rb') as fd:

View File

@ -174,7 +174,8 @@ class GenericMetadata:
def overlayCredits(self, new_credits): def overlayCredits(self, new_credits):
for c in new_credits: for c in new_credits:
if c.has_key('primary') and c['primary']: if 'primary' in c:
# if c.has_key('primary') and c['primary']:
primary = True primary = True
else: else:
primary = False primary = False
@ -294,7 +295,8 @@ class GenericMetadata:
for c in self.credits: for c in self.credits:
primary = "" primary = ""
if c.has_key('primary') and c['primary']: if 'primary' in c:
# if c.has_key('primary') and c['primary']:
primary = " [P]" primary = " [P]"
add_string("credit", c['role'] + ": " + c['person'] + primary) add_string("credit", c['role'] + ": " + c['person'] + primary)