mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Changed cover image detection to favor Null
This commit is contained in:
@@ -46,7 +46,10 @@ class Storage:
|
||||
except: cover_image = book[2]
|
||||
x = self.cursor.execute(q_x, (book[0],))
|
||||
try: len(x.fetchone()) > 0
|
||||
except Exception: self.cursor.execute(q, (book[0], book[1], cover_image, book[3]))
|
||||
except Exception:
|
||||
if not book[2]: # If cover image is missing unset entry
|
||||
cover_image = None
|
||||
self.cursor.execute(q, (book[0], book[1], cover_image, book[3]))
|
||||
return True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user