From baec34cc51c5822c002b22072a9e99d662dce465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Mon, 30 Jul 2018 10:50:17 -0400 Subject: New upstream version 0.9.10 --- raphodo/rpdsql.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'raphodo/rpdsql.py') diff --git a/raphodo/rpdsql.py b/raphodo/rpdsql.py index 112aea0..7988158 100755 --- a/raphodo/rpdsql.py +++ b/raphodo/rpdsql.py @@ -734,6 +734,15 @@ class CacheSQL: def db_fs_name(self) -> str: return 'thumbnail_cache.sqlite' + def cache_exists(self) -> bool: + conn = sqlite3.connect(self.db) + row = conn.execute( + """SELECT name FROM sqlite_master WHERE type='table' AND name='{}'""".format(self.table_name) + ).fetchone() + conn.close() + return row is not None + + def update_table(self, reset: bool=False) -> None: """ Create or update the database table -- cgit v1.2.3