From 02760aac6863d5134f0fd60037e074bef18594c3 Mon Sep 17 00:00:00 2001 From: Hydrus Network Developer Date: Wed, 23 Dec 2020 17:07:58 -0600 Subject: [PATCH] Version 423 --- client.py | 10 + client.pyw | 10 + help/changelog.html | 24 ++ help/launch_arguments.html | 4 + hydrus/client/ClientDB.py | 277 ++++++++++++++++-- hydrus/client/ClientOptions.py | 4 - hydrus/client/ClientSearch.py | 4 +- hydrus/client/gui/ClientGUI.py | 1 + hydrus/client/gui/ClientGUIControls.py | 6 +- hydrus/client/gui/ClientGUIDialogsManage.py | 2 +- hydrus/client/gui/ClientGUIDownloaders.py | 6 +- hydrus/client/gui/ClientGUIFileSeedCache.py | 6 +- hydrus/client/gui/ClientGUIGallerySeedLog.py | 2 +- hydrus/client/gui/ClientGUIImport.py | 33 ++- hydrus/client/gui/ClientGUIManagement.py | 4 +- hydrus/client/gui/ClientGUIPages.py | 45 ++- hydrus/client/gui/ClientGUIParsing.py | 166 +++++++++-- .../gui/ClientGUIScrolledPanelsManagement.py | 37 +-- .../gui/ClientGUIScrolledPanelsReview.py | 2 +- hydrus/client/gui/ClientGUIStringPanels.py | 2 +- hydrus/client/gui/ClientGUITags.py | 42 ++- hydrus/client/gui/lists/ClientGUIListBoxes.py | 235 +++++++++------ .../client/gui/search/ClientGUIACDropdown.py | 33 ++- hydrus/client/metadata/ClientTagsHandling.py | 65 +++- hydrus/core/HydrusConstants.py | 2 +- hydrus/core/HydrusDB.py | 5 +- hydrus/core/HydrusFileHandling.py | 10 +- hydrus/core/HydrusGlobals.py | 2 + hydrus/core/HydrusText.py | 24 +- hydrus/test/TestClientTags.py | 26 ++ server.py | 10 + 31 files changed, 826 insertions(+), 273 deletions(-) diff --git a/client.py b/client.py index 2079f1e3..b12e44b7 100644 --- a/client.py +++ b/client.py @@ -31,6 +31,7 @@ try: argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) argparser.add_argument( '--temp_dir', help = 'override the program\'s temporary directory' ) argparser.add_argument( '--db_journal_mode', default = 'WAL', choices = [ 'WAL', 'TRUNCATE', 'PERSIST', 'MEMORY' ], help = 'change db journal mode (default=WAL)' ) + argparser.add_argument( '--db_cache_size', type = int, help = 'override SQLite cache_size per db file, in MB (default=200)' ) argparser.add_argument( '--db_synchronous_override', type = int, choices = range(4), help = 'override SQLite Synchronous PRAGMA (default=2)' ) argparser.add_argument( '--no_db_temp_files', action='store_true', help = 'run db temp operations entirely in memory' ) argparser.add_argument( '--boot_debug', action='store_true', help = 'print additional bootup information to the log' ) @@ -88,6 +89,15 @@ try: HG.db_journal_mode = 'MEMORY' + if result.db_cache_size is not None: + + HG.db_cache_size = result.db_cache_size + + else: + + HG.db_cache_size = 200 + + if result.db_synchronous_override is not None: HG.db_synchronous = int( result.db_synchronous_override ) diff --git a/client.pyw b/client.pyw index 1f1cc31b..ffa536a3 100755 --- a/client.pyw +++ b/client.pyw @@ -31,6 +31,7 @@ try: argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) argparser.add_argument( '--temp_dir', help = 'override the program\'s temporary directory' ) argparser.add_argument( '--db_journal_mode', default = 'WAL', choices = [ 'WAL', 'TRUNCATE', 'PERSIST', 'MEMORY' ], help = 'change db journal mode (default=WAL)' ) + argparser.add_argument( '--db_cache_size', type = int, help = 'override SQLite cache_size per db file, in MB (default=200)' ) argparser.add_argument( '--db_synchronous_override', type = int, choices = range(4), help = 'override SQLite Synchronous PRAGMA (default=2)' ) argparser.add_argument( '--no_db_temp_files', action='store_true', help = 'run db temp operations entirely in memory' ) argparser.add_argument( '--boot_debug', action='store_true', help = 'print additional bootup information to the log' ) @@ -88,6 +89,15 @@ try: HG.db_journal_mode = 'MEMORY' + if result.db_cache_size is not None: + + HG.db_cache_size = result.db_cache_size + + else: + + HG.db_cache_size = 200 + + if result.db_synchronous_override is not None: HG.db_synchronous = int( result.db_synchronous_override ) diff --git a/help/changelog.html b/help/changelog.html index 191c0556..30e825d5 100755 --- a/help/changelog.html +++ b/help/changelog.html @@ -8,6 +8,30 @@

changelog