Skip to content

Commit 41c75ac

Browse files
committed
Version 624
1 parent a81b0e9 commit 41c75ac

43 files changed

Lines changed: 1724 additions & 566 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/changelog.md

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

docs/old_changelog.html

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,51 @@
3434
<div class="content">
3535
<h1 id="changelog"><a href="#changelog">changelog</a></h1>
3636
<ul>
37+
<li>
38+
<h2 id="version_624"><a href="#version_624">version 624</a></h2>
39+
<ul>
40+
<li><h3>locked pages</h3></li>
41+
<li>the search page state where it could hold files but have no active search is back with some bells and whistles. it is now much easier to manage a 'scratchpad' file page that won't suddenly get messed up if you hit F5 (issue #1602, and likely others in different ways)</li>
42+
<li>all normal file search pages now have a padlock icon beside the autocomplete text input. clicking this collapses the current search to a single system:hash of the current media in view and swaps the search panel for an 'unlock' button. this page will not refresh its query until unlocked, at which point you are given the system:hash back</li>
43+
<li>if you add files to or remove files from the page, the underlying system:hash will update to the new contents of the page</li>
44+
<li>lock status is saved in the session, so it persists through restart etc..</li>
45+
<li>any time you create a page with files, which typically means, 'open files in a new page' and subscription file-popups, they now start in the locked state. since the system:hash updates for new files, you can drag and drop new files onto the page, or add more subscription files from a later sync, and the underlying system:hash now stays updated. play around with it--you'll see how it works</li>
46+
<li>if you are big brain and wish in some cases _not_ to sync the underlying system:hash on add/remove file events, a cog icon beside the unlock button lets you set this</li>
47+
<li>if you have a bunch of existing subscription landing pages and other 'I'll process this later' pages, please go through them after update and lock them. it'll say 'hey, you already have a system:hash but it differs to what is currently in view, do you want to overwrite this old one with one for the current files?' and you do, so click yes</li>
48+
<li>next step here is to finally figure out some sort of 'sort files by system:hash/downloader' sort type so these sorts of pages can restore original sort</li>
49+
<li><h3>duplicates</h3></li>
50+
<li>the 'preview' panel of an auto-resolution rule has had a complete pipeline overhaul. after a much, much, briefer one-time initialisation, it now loads results in fast small batches and streams pass/fail pairs to the lists one by one. it shows search progress and presents ongoing count of pairs. it no longer gets the total count of the search every time--unless you let it run all the way and get everything. the refresh buttons are more efficient, the 'only sample this many' widget updates the dialog live as you edit it, and there are pause buttons for both search and testing. it also cancels work faster if the dialog is closed amidst work. this dialog is now ready for the relatively CPU-expensive 'A and B are visual duplicates' integration</li>
51+
<li>when the core duplicate file searches they rely on are CPU-expensive, the duplicates filter batch pair fetch, duplicates filter count fetch, duplicates 'show some random pairs', and duplicates auto-resolution rule preview now load up faster, particularly when you have few potential pairs remaining</li>
52+
<li>auto-resolution rules that are in semi-automatic mode now only queue up a max of 512 files in the 'pending' queue. it can take some CPU to run these tests, so it is good to keep the queue short and snappy in case you need to change anything (thus resetting the queue) in future. you can alter the 512 limit, including removing it completely, in the edit rule panel</li>
53+
<li>auto-resolution rules now categorise their comparators into a cross-reference of fast + order-possibly-important. the main testing routine and 'can this pair fit either way' test now cascades through some logic to get a dispositive true negative result faster</li>
54+
<li>the program now recognises and gracefully handles the situation where the duplicate filter is closed and program shut down initiated before a slow-loading visual duplicate pair can finish (it was outputting some mysterious error lines to the log)</li>
55+
<li><h3>a and b are visual duplicates</h3></li>
56+
<li>if the images are very simple, e.g. just one or two flat colours, they are now considered 'too simple to compare' and not visual duplicates. these edge cases are often deceptively tricky</li>
57+
<li>if the images have a perfectly matching interesting tile, the presence of any non-matching tile now results in 'probably not visual duplicates/(small difference?)'</li>
58+
<li>I experimented with many new techniques: pre-decimation histogram population, histogram absolute difference comparison, tile phashes, longer tile phashes, gaussian edge detection histograms, gaussian edge map average block 2d wasserstein scoring, and even gaussian edge map phashes, but unfortunately these all pretty much failed. the algorithm as-is is good, but there are still a couple of false positive situations it cannot catch. the delicate edge detection is the main thing--a difference with a subtle shade (e.g. a soft line, or a transparent water droplet) that is clear to the human eye can still be missed. please keep sending in any false positives, and I'll keep thinking about all this</li>
59+
<li>cleaned and polished a bunch of this code</li>
60+
<li><h3>misc</h3></li>
61+
<li>thanks to a user, the new resizable ratings have improved visuals! the little padding clipping bugs are fixed and everything lines up nice</li>
62+
<li>'less than or equal to' and 'greater than or equal to' are added to all the modernised places you can set a number comparison, such as `system:height` or duplicates auto-resolution comparison statements</li>
63+
<li>fixed the broken `Ctrl+C = copy selected files` default 'media' shortcut for newer users--if it is broken for you (it'll say 'Unknown Application Command' in the shortcut UI), it will fix itself on update</li>
64+
<li><h3>updated Linux and Windows builds</h3></li>
65+
<li>the 'future build' last week went without any reports of problems, so I am folding the changes into today's normal build. both Windows and Linux are updating several core components and will gain a host of small and large bug fixes and performance improvements. It does not seem that a clean install is needed this week, but if you use the zip or tar.zst extracts, you might like to take this opportunity to do one anyway: https://hydrusnetwork.github.io/hydrus/getting_started_installing.html#clean_installs</li>
66+
<li>the WIndows installer basically does a clean install every week, so no special instructions there</li>
67+
<li>the changes are--</li>
68+
<li>Windows and Linux: moved from python 3.11 to python 3.12</li>
69+
<li>Windows and Linux: moved from PySide6 (Qt) 6.7.3 to 6.8.2.1</li>
70+
<li>Windows: moved from windows-2019 runner to windows-2022 (2019 runner is being retired next month)</li>
71+
<li>if you use a particularly old, un-updated version of Windows 10, it is possible the new Windows builds will not run for you. try running from source and choosing an older Qt version: https://hydrusnetwork.github.io/hydrus/running_from_source.html</li>
72+
<li>if you already run from source, you might like to rebuild your venv this week to get the new Qt. users on Python 3.13 no longer have to choose the (a)dvanced mode for the (t)est Qt version-- on a typical OS, all pythons from 3.10-13 should now work with (s) out of the box!</li>
73+
<li><h3>weird/boring stuff</h3></li>
74+
<li>I fixed some encoding in my png gamma/chromaticity ICC Profile generator. it still isn't there, but I know where to look. also wangled the `wtpt` and `chad` to handle non-D65 source whitepoints</li>
75+
<li>I may have fixed an issue where the thumbnail banners could be drawn with bold text</li>
76+
<li>my asynchronous updater object can now deal with several mid-job cancel events</li>
77+
<li>my thumbnail pair list can now handle streaming appends</li>
78+
<li>deleted the monolith 'get potential pairs that match this duplicate context' routine the preview panel was relying on. I'll migrate more duplicates stuff to incremental fetches like this, and I feel good we can make the duplicate filter and so on initialise much quicker</li>
79+
<li>updated the client api help's Hydrus Video Deduplicator link to https://github.com/hydrusvideodeduplicator/hydrus-video-deduplicator</li>
80+
</ul>
81+
</li>
3782
<li>
3883
<h2 id="version_623"><a href="#version_623">version 623</a></h2>
3984
<ul>
@@ -42,7 +87,7 @@ <h2 id="version_623"><a href="#version_623">version 623</a></h2>
4287
<li>the client now tries to adjust for timezone when it parses a modified date from a server response. some downloaders will now get a more precise 'modified date' for their domains</li>
4388
<li>fixed a typo bug that was causing existing 'set numerical or inc/dec rating' commands to fail to initialise in the shortcut panel on edit (staying as the default 'simple command, archive file')</li>
4489
<li>a new `DEBUG: Activate Main GUI when closing the media viewer` checkbox under `options-&gt;media viewer`, default fa!se, lets you force an "activate" call on the Main GUI (bringing it to the front and setting keyboard focus) on any media viewer close</li>
45-
<li>the hydrus server now better tries to clear out ongoing file downloads when the connection is disconnected early. if you noticed in Hydrus Web or similar that scrubbing through a bunch of big videos one after another could get laggy, let me know if it is any better now</li>
90+
<li>the core hydrus server/client api response object now better tries to clear out ongoing file downloads when the connection is disconnected early. if you noticed in Hydrus Web or similar that scrubbing through a bunch of big videos one after another could get laggy, let me know if it is any better now</li>
4691
<li><h3>duplicates</h3></li>
4792
<li>all duplicate filters now have the 'A and B are visual duplicates' comparison statement. this is a custom algorthim that inspects the images and attempts to differentiate resizes/re-encodes from recolours/alternates. please rely on it as you do normal duplicate filtering of images from now on, and if it produces any false positives, I'd love to see the files!</li>
4893
<li>I improved this 'A and B are visual duplicates' algorithm after our test. overall it went very well, with only a couple false positives found. thank you for your feedback, everyone. I improved the 'skewness' test to reduce the number of false negatives, and I added a new special test to catch the false positives submitted. further, I have softened the 'no' result texts and categorised the 'yes' results into three clear 'very probably'/'definitely'/'perfectly' lines so you can better recognise edge cases. when this test is integrated into the auto-resolution system, I will default to just definitely/perfectly results to start</li>

hydrus/client/ClientConstants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ def _Initialise( self ):
640640
self.highlight = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'highlight.png' ) )
641641
self.clear_highlight = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'clear_highlight.png' ) )
642642

643+
self.lock = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'lock.png' ) )
644+
self.lock_open = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'lock_open.png' ) )
645+
643646
self.star = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'star.png' ) )
644647

645648
#self.listctrl = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'listctrl.png' ) )

hydrus/client/ClientDefaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def GetDefaultShortcuts():
314314

315315
media.SetCommand(
316316
ClientGUIShortcuts.Shortcut( ClientGUIShortcuts.SHORTCUT_TYPE_KEYBOARD_CHARACTER, ord( 'C' ), ClientGUIShortcuts.SHORTCUT_PRESS_TYPE_PRESS, [ ClientGUIShortcuts.SHORTCUT_MODIFIER_CTRL ] ),
317-
CAC.ApplicationCommand.STATICCreateSimpleCommand( CAC.SIMPLE_COPY_FILES )
317+
CAC.ApplicationCommand.STATICCreateSimpleCommand( CAC.SIMPLE_COPY_FILES, simple_data = CAC.FILE_COMMAND_TARGET_SELECTED_FILES )
318318
)
319319

320320
shortcuts.append( media )

hydrus/client/db/ClientDB.py

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3834,6 +3834,7 @@ def _InitCommandsToMethods( self ):
38343834

38353835
self._read_commands_to_methods.update(
38363836
{
3837+
'all_potential_duplicate_pairs_and_distances' : self.modules_files_duplicates.GetAllPotentialDuplicatePairsAndDistances,
38373838
'autocomplete_predicates' : self.modules_tag_search.GetAutocompletePredicates,
38383839
'client_files_subfolders' : self.modules_files_physical_storage.GetClientFilesSubfolders,
38393840
'deferred_delete_data' : self.modules_db_maintenance.GetDeferredDeleteTableData,
@@ -3861,7 +3862,7 @@ def _InitCommandsToMethods( self ):
38613862
'missing_archive_timestamps_legacy_test' : self.modules_files_inbox.WeHaveMissingLegacyArchiveTimestamps,
38623863
'missing_repository_update_hashes' : self.modules_repositories.GetRepositoryUpdateHashesIDoNotHave,
38633864
'num_deferred_file_deletes' : self.modules_files_storage.GetDeferredPhysicalDeleteCounts,
3864-
'potential_duplicate_pairs' : self.modules_files_duplicates_file_query.GetPotentialDuplicatePairs,
3865+
'potential_duplicate_pairs_fragmentary' : self.modules_files_duplicates_file_query.GetPotentialDuplicatePairsForAutoResolutionMediaResults,
38653866
'recent_tags' : self.modules_recent_tags.GetRecentTags,
38663867
'repository_progress' : self.modules_repositories.GetRepositoryProgress,
38673868
'repository_update_hashes_to_process' : self.modules_repositories.GetRepositoryUpdateHashesICanProcess,
@@ -9190,6 +9191,46 @@ def notify_deleting_auto_resolution_rules():
91909191

91919192

91929193

9194+
if version == 623:
9195+
9196+
try:
9197+
9198+
from hydrus.client.gui import ClientGUIShortcuts
9199+
from hydrus.client import ClientApplicationCommand as CAC
9200+
9201+
media_shortcuts_set: ClientGUIShortcuts.ShortcutSet = self.modules_serialisable.GetJSONDumpNamed( HydrusSerialisable.SERIALISABLE_TYPE_SHORTCUT_SET, 'media' )
9202+
9203+
jobs = [
9204+
(
9205+
ClientGUIShortcuts.Shortcut( ClientGUIShortcuts.SHORTCUT_TYPE_KEYBOARD_CHARACTER, ord( 'C' ), ClientGUIShortcuts.SHORTCUT_PRESS_TYPE_PRESS, [ ClientGUIShortcuts.SHORTCUT_MODIFIER_CTRL ] ),
9206+
CAC.ApplicationCommand.STATICCreateSimpleCommand( CAC.SIMPLE_COPY_FILES ),
9207+
CAC.ApplicationCommand.STATICCreateSimpleCommand( CAC.SIMPLE_COPY_FILES, simple_data = CAC.FILE_COMMAND_TARGET_SELECTED_FILES )
9208+
)
9209+
]
9210+
9211+
for ( shortcut, bad_command, good_command ) in jobs:
9212+
9213+
if media_shortcuts_set.HasCommand( shortcut ):
9214+
9215+
if media_shortcuts_set.GetCommand( shortcut ) == bad_command:
9216+
9217+
media_shortcuts_set.SetCommand( shortcut, good_command )
9218+
9219+
9220+
9221+
9222+
self.modules_serialisable.SetJSONDump( media_shortcuts_set )
9223+
9224+
except Exception as e:
9225+
9226+
HydrusData.PrintException( e )
9227+
9228+
message = 'Trying to update some shortcuts failed! Please let hydrus dev know!'
9229+
9230+
self.pub_initial_message( message )
9231+
9232+
9233+
91939234
self._controller.frame_splash_status.SetTitleText( 'updated db to v{}'.format( HydrusNumbers.ToHumanInt( version + 1 ) ) )
91949235

91959236
self._Execute( 'UPDATE version SET version = ?;', ( version + 1, ) )

hydrus/client/db/ClientDBFilesDuplicates.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,11 @@ def FilterExistingPotentialDuplicatePairs( self, potential_pair_ids_table_name:
521521
return existing_pairs
522522

523523

524+
def GetAllPotentialDuplicatePairsAndDistances( self ):
525+
526+
return self._Execute( 'SELECT smaller_media_id, larger_media_id, distance FROM potential_duplicate_pairs;' ).fetchall()
527+
528+
524529
def GetAlternatesGroupId( self, media_id, do_not_create = False ):
525530

526531
result = self._Execute( 'SELECT alternates_group_id FROM alternate_file_group_members WHERE media_id = ?;', ( media_id, ) ).fetchone()

hydrus/client/db/ClientDBFilesDuplicatesAutoResolutionSearch.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,32 @@ def get_row():
9494
return self.modules_files_duplicates_auto_resolution_storage.GetMatchingUntestedPair( rule )
9595

9696

97+
current_num_pending_pairs = rule.GetCountsCacheDuplicate()[ ClientDuplicatesAutoResolution.DUPLICATE_STATUS_MATCHES_SEARCH_PASSED_TEST_READY_TO_ACTION ]
98+
99+
def pending_pairs_full_up():
100+
101+
if rule.GetOperationMode() == ClientDuplicatesAutoResolution.DUPLICATES_AUTO_RESOLUTION_RULE_OPERATION_MODE_WORK_BUT_NO_ACTION:
102+
103+
max_pending_pairs = rule.GetMaxPendingPairs()
104+
105+
if max_pending_pairs is not None and current_num_pending_pairs >= max_pending_pairs:
106+
107+
return True
108+
109+
110+
111+
return False
112+
113+
97114
pair_to_work = get_row()
98115

99116
while pair_to_work is not None:
100117

118+
if pending_pairs_full_up():
119+
120+
return False
121+
122+
101123
( smaller_media_id, larger_media_id ) = pair_to_work
102124

103125
smaller_hash_id = self.modules_files_duplicates.GetBestKingId( smaller_media_id, db_location_context = db_location_context )
@@ -145,6 +167,8 @@ def get_row():
145167

146168
if operation_mode == ClientDuplicatesAutoResolution.DUPLICATES_AUTO_RESOLUTION_RULE_OPERATION_MODE_WORK_BUT_NO_ACTION:
147169

170+
current_num_pending_pairs += 1
171+
148172
self.modules_files_duplicates_auto_resolution_storage.SetPairToPendingAction( rule, smaller_media_id, larger_media_id, hash_id_a, hash_id_b )
149173

150174
else:

0 commit comments

Comments
 (0)