From 25b2ee40717f6dc15fc03a1635fea596bade48b5 Mon Sep 17 00:00:00 2001 From: Phil Borman Date: Wed, 21 Jun 2017 18:01:55 +0200 Subject: [PATCH] Fix check for missing books on libraryscan --- lazylibrarian/librarysync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazylibrarian/librarysync.py b/lazylibrarian/librarysync.py index b4b7b3dcd..32f444f5e 100644 --- a/lazylibrarian/librarysync.py +++ b/lazylibrarian/librarysync.py @@ -333,7 +333,7 @@ def LibraryScan(startdir=None, library='eBook'): for book in books: bookfile = book['BookFile'] - if not (bookfile and os.path.isfile(bookfile)): + if bookfile and not os.path.isfile(bookfile): myDB.action('update books set Status="%s",BookFile="",BookLibrary="" where BookID="%s"' % (status, book['BookID'])) logger.warn('eBook %s - %s updated as not found on disk' % @@ -350,7 +350,7 @@ def LibraryScan(startdir=None, library='eBook'): for book in books: bookfile = book['AudioFile'] - if not (bookfile and os.path.isfile(bookfile)): + if bookfile and not os.path.isfile(bookfile): myDB.action('update books set AudioStatus="%s",AudioFile="",AudioLibrary="" where BookID="%s"' % (status, book['BookID'])) logger.warn('Audiobook %s - %s updated as not found on disk' %