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.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 = self.default_image_path
with open(fname, 'rb') as fd:

View File

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