diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index 1a80dfc1..9d107cb2 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -62,10 +62,7 @@ -
- - -
+
diff --git a/cps/ub.py b/cps/ub.py index d9672b5e..aa064282 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -275,7 +275,6 @@ class Settings(Base): config_google_drive_folder = Column(String) config_google_drive_calibre_url_base = Column(String) config_google_drive_watch_changes_response = Column(String) - config_columns_to_ignore = Column(String) def __repr__(self): pass @@ -311,7 +310,7 @@ class Config: self.config_google_drive_watch_changes_response = json.loads(data.config_google_drive_watch_changes_response) else: self.config_google_drive_watch_changes_response=None - self.config_columns_to_ignore = data.config_columns_to_ignore + if (self.config_calibre_dir is not None and not self.config_use_google_drive) or os.path.exists(self.config_calibre_dir + '/metadata.db'): self.db_configured = True else: @@ -407,12 +406,6 @@ def migrate_Database(): conn.execute("ALTER TABLE Settings ADD column `config_google_drive_calibre_url_base` INTEGER DEFAULT 0") conn.execute("ALTER TABLE Settings ADD column `config_google_drive_folder` String DEFAULT ''") conn.execute("ALTER TABLE Settings ADD column `config_google_drive_watch_changes_response` String DEFAULT ''") - try: - session.query(exists().where(Settings.config_columns_to_ignore)).scalar() - except exc.OperationalError: - conn = engine.connect() - conn.execute("ALTER TABLE Settings ADD column `config_columns_to_ignore` String DEFAULT ''") - session.commit() try: session.query(exists().where(Settings.config_default_role)).scalar() session.commit() diff --git a/cps/web.py b/cps/web.py index c4045ba1..f15fe904 100755 --- a/cps/web.py +++ b/cps/web.py @@ -1124,16 +1124,7 @@ def show_book(id): except: entries.languages[index].language_name = _( isoLanguages.get(part3=entries.languages[index].lang_code).name) - tmpcc = db.session.query(db.Custom_Columns).filter(db.Custom_Columns.datatype.notin_(db.cc_exceptions)).all() - - if config.config_columns_to_ignore: - cc=[] - for col in tmpcc: - r= re.compile(config.config_columns_to_ignore) - if r.match(col.label): - c.append(col) - else: - cc=tmpcc + cc = db.session.query(db.Custom_Columns).filter(db.Custom_Columns.datatype.notin_(db.cc_exceptions)).all() book_in_shelfs = [] shelfs = ub.session.query(ub.BookShelf).filter(ub.BookShelf.book_id == id).all() for entry in shelfs: @@ -1988,8 +1979,6 @@ def configuration_helper(origin): reboot_required = True if "config_calibre_web_title" in to_save: content.config_calibre_web_title = to_save["config_calibre_web_title"] - if "config_columns_to_ignore" in to_save: - content.config_columns_to_ignore = to_save["config_columns_to_ignore"] if "config_title_regex" in to_save: if content.config_title_regex != to_save["config_title_regex"]: content.config_title_regex = to_save["config_title_regex"]