From 16cce0601fb74d196ed57857a4efa57776301c94 Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 4 Oct 2019 17:14:51 -0400 Subject: [PATCH] Temporarily display cover image --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 65fdd2d..fcbb4a9 100755 --- a/main.py +++ b/main.py @@ -19,7 +19,10 @@ Catalogue = Catalogue() book_list = Catalogue.filter_books() for book in book_list: extracted = Catalogue.extract_metadata(book_list[book]) - cover_image = Image.open(extracted[2]) - cover_image.show() + # TODO Insert extracted data to database + if extracted[2] != False: + # Only display if a image is present + cover_image = Image.open(extracted[2]) + cover_image.show() # TODO Insert book in database print(extracted) \ No newline at end of file