Skip to content

Commit

Permalink
Version 372
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrusnetwork committed Oct 16, 2019
1 parent 2aee0dc commit a04a5c2
Show file tree
Hide file tree
Showing 28 changed files with 510 additions and 134 deletions.
2 changes: 1 addition & 1 deletion help/access_keys.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3>manually</h3>
<li>4a285629721ca442541ef2c15ea17d1f7f7578b0c3f4f5f2a05f8f0ab297786f</li>
</ul>
<p>It is worth checking the 'test address' and 'test access key' buttons just to double-check your firewall and key are all correct.</p>
<p><b>Tags are rich, cpu-intensive metadata. The Public Tag Repository has hundreds of millions of mappings, and your client will eventually download and index them all. It will take a few gigabytes of downloading and <i>hours</i> of total processing time to fully synchronise. <span class="warning">Because of mechanical drive latency, HDDs are often too slow to process hundruds of millions of tags in reasonable time. Syncing with large repositories is only recommended <a href="database_migration.html">if your hydrus db is on an SSD</a>.</span> Even then, it is best left to work on this in small pieces in the background, either during idle time or shutdown time, so unless you are an advanced user, just leave it to download and process on its own--it usually takes a couple of weeks to quietly catch up.</b></p>
<p><b>Tags are rich, cpu-intensive metadata. The Public Tag Repository has hundreds of millions of mappings, and your client will eventually download and index them all. It will take a few gigabytes of downloading and <i>hours</i> of total processing time to fully synchronise. <span class="warning">Because of mechanical drive latency, HDDs are often too slow to process hundreds of millions of tags in reasonable time. Syncing with large repositories is only recommended <a href="database_migration.html">if your hydrus db is on an SSD</a>.</span> Even then, it is best left to work on this in small pieces in the background, either during idle time or shutdown time, so unless you are an advanced user, just leave it to download and process on its own--it usually takes a couple of weeks to quietly catch up.</b></p>
<h3>jump-starting an install</h3>
<p>A user kindly manages a store of update files and pre-processed empty client databases to get your synced quicker. This is generally recommended for advanced users or those following a guide, but if you are otherwise interested, please check it out:</p>
<p><a href="https://cuddlebear92.github.io/Quicksync/">https://cuddlebear92.github.io/Quicksync/</a></p>
Expand Down
28 changes: 27 additions & 1 deletion help/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@
<div class="content">
<h3>changelog</h3>
<ul>
<li><h3>version 372</h3></li>
<ul>
<li>petitions processing page:</li>
<li>the selection taglist now displays the raw 'storage' tag view, before siblings are applied</li>
<li>added a noneable spinctrl to control how many files are shown on a petition row double-click. it samples randomly and defaults to 256</li>
<li>I think I fixed the issue where the petitions taglist sometimes hangs on to some old tags after a petition process event</li>
<li>.</li>
<li>the rest:</li>
<li>you can now customise the animation scanbar height and nub width under options->media</li>
<li>all users now see the number of open pages in the pages menu</li>
<li>added approx total session 'weight' to the pages menu. this is an early test and will do more and update more frequently in future</li>
<li>added add/remove tag to favourites to the taglist right-click menu</li>
<li>collapsed the taglist right-click menu a little, as it was getting a bit tall</li>
<li>added https://gitgud.io/koto/hydrus-archive-delete, a web browser archive/delete filter, to client api help</li>
<li>added clipboard import/export buttons to the edit tag filter panel for the new favourites</li>
<li>added 'open in a new page' to media viewer right-click menus, just to put the current single media in a new page</li>
<li>fixed the url class edit panel not initialising with the new referral options correctly</li>
<li>the call that publishes new subscription/import folder media to pages now does so more politely to the gui when the db is busy</li>
<li>subscriptions will no longer start if global network traffice is paused</li>
<li>the 'hard-replace siblings/parents' action under manage tags is now a local-only operation for tag repositories. clients with unusual sibling and parent application will no longer affect the repos they sync with</li>
<li>on program shutdown, if a daemon takes more than thirty seconds to shutdown (which can happen in odd situations, like if a subscription run is paused by global network traffic pause, leading to shutdown deadlock), the client will stop waiting and continue with other shutdown tasks</li>
<li>fixed an error with client 'already running' fast exit</li>
<li>fixed a different error with server 'already running' exit choice</li>
<li>updated some ffmpeg calls to fix certain OS problems</li>
<li>fixed a help link to todolist recommendation and added link to new ptr guidelines</li>
</ul>
<li><h3>version 371</h3></li>
<ul>
<li>the edit tag filter panel now has load/save/delete buttons at the top to manage tag filter favourites. it starts with a handful of examples</li>
Expand All @@ -28,7 +54,7 @@ <h3>changelog</h3>
<li>the janitorial petitions processing page now lets you copy tags and left/right tags of pairs with a right-click on selected checkbox rows</li>
<li>cleaned a little server code</li>
<li>improved how the server sets and releases its 'currently busy' mode</li>
<li>the server no longer does <5min vacuums in a backup command</li>
<li>the server no longer does &lt;5min vacuums in a backup command</li>
<li>added a specific 'vacuum' server POST command that forces a full vacuum</li>
<li>added 'lock_on' and 'lock_off' server POST commands to lock the server and shut down the db, and restart</li>
<li>the new vacuum, lock_on, lock_off, and a 'is server busy?' check commands are added to the services->admin menu</li>
Expand Down
3 changes: 2 additions & 1 deletion help/client_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ <h3>Support created by hydrus users:</h3>
<ul>
<li><a href="https://gitgud.io/prkc/hydrus-companion">https://gitgud.io/prkc/hydrus-companion</a> - Hydrus Companion, a browser extension for hydrus.</li>
<li><a href="https://gitgud.io/prkc/dolphin-hydrus-actions">https://gitgud.io/prkc/dolphin-hydrus-actions</a> - Adds Hydrus right-click context menu actions to Dolphin file manager.</li>
<li><a href="https://gitgud.io/koto/hydrus-dd">https://gitgud.io/koto/hydrus-dd</a> - DeepDanbooru neural network tagging for Hydrus</li>
<li><a href="https://gitgud.io/koto/hydrus-archive-delete">https://gitgud.io/koto/hydrus-archive-delete</a> - Archive/Delete filter in your web browser</li>
<li><a href="https://gitlab.com/cryzed/hydrus-api">https://gitlab.com/cryzed/hydrus-api</a> - A python module that talks to the API.</li>
<li><a href="https://github.com/cravxx/hydrus.js">https://github.com/cravxx/hydrus.js</a> - A node.js module that talks to the API.</li>
<li><a href="https://gitgud.io/koto/hydrus-dd/">https://gitgud.io/koto/hydrus-dd/</a> - DeepDanbooru neural network tagging for Hydrus</li>
</ul>
<h3>API</h3>
<p>If the API returns anything but actual files on 200, it should always return JSON. On 4XX and 5XX, assume it will return plain text, sometimes a raw traceback. You'll typically get 400 for a missing parameter, 401/403/419 for missing/insufficient/expired access, and 500 for a real deal serverside error.</p>
Expand Down
2 changes: 1 addition & 1 deletion help/getting_started_installing.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h3 id="big_updates">big updates</h3>
<h3 id="backing_up">backing up</h3>
<p>You <i>do</i> backup, right? <i>Right</i>?</p>
<p>I run a backup every week so that if my computer blows up or anything else awful happens, I'll at worst have lost a few days' work. Before I did this, I once lost an entire drive with tens of thousands of files, and it sucked. I encourage backups so you might avoid what I felt. ;_;</p>
<p>I use <a href="http://www.abstractspoon.com/tdl_resources.html">ToDoList</a> to remind me of my jobs for the day, including backup tasks, and <a href="http://sourceforge.net/projects/freefilesync/">FreeFileSync</a> to actually mirror over to an external usb drive. I recommend both highly. It isn't a huge expense to get a couple-TB usb drive either--it is <b>absolutely</b> worth it for the peace of mind.</p>
<p>I use <a href="http://abstractspoon.com/">ToDoList</a> to remind me of my jobs for the day, including backup tasks, and <a href="http://sourceforge.net/projects/freefilesync/">FreeFileSync</a> to actually mirror over to an external usb drive. I recommend both highly (and for ToDoList, I recommend hiding the complicated columns, stripping it down to a simple interface). It isn't a huge expense to get a couple-TB usb drive either--it is <b>absolutely</b> worth it for the peace of mind.</p>
<p>By default, hydrus stores all your user data in one location, so backing up is simple:</p>
<ul>
<li>
Expand Down
4 changes: 2 additions & 2 deletions help/getting_started_tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ <h3>tag repositories</h3>
<p>Anyone can run a tag repository, but it is a bit complicated for new users. I ran a public tag repository for a long time, and now this large central store is run by users. It has hundreds of millions of tags and is free to access and contribute to.</p>
<p>To connect with it, please check <a href="access_keys.html">here</a>.</h3>
<p>If you add it, your client will download updates from the repository over time and, usually when it is idle or shutting down, 'process' them into its database until it is fully synchronised. The processing step is CPU and HDD heavy, and you can customise when it happens in <i>file->options->maintenance and processing</i>. As the repository synchronises, you should see some new tags appear, particularly on famous files that lots of people have.</p>
<p><b>Tags are rich, cpu-intensive metadata. The Public Tag Repository has hundreds of millions of mappings, and your client will eventually download and index them all. It will take a few gigabytes of downloading and <i>hours</i> of total processing time to fully synchronise. <span class="warning">Because of mechanical drive latency, HDDs are often too slow to process hundruds of millions of tags in reasonable time. Syncing with large repositories is only recommended <a href="database_migration.html">if your hydrus db is on an SSD</a>.</span> Even then, it is best left to work on this in small pieces in the background, either during idle time or shutdown time, so unless you are an advanced user, just leave it to download and process on its own--it usually takes a couple of weeks to quietly catch up.</b></p>
<p><b>Tags are rich, cpu-intensive metadata. The Public Tag Repository has hundreds of millions of mappings, and your client will eventually download and index them all. It will take a few gigabytes of downloading and <i>hours</i> of total processing time to fully synchronise. <span class="warning">Because of mechanical drive latency, HDDs are often too slow to process hundreds of millions of tags in reasonable time. Syncing with large repositories is only recommended <a href="database_migration.html">if your hydrus db is on an SSD</a>.</span> Even then, it is best left to work on this in small pieces in the background, either during idle time or shutdown time, so unless you are an advanced user, just leave it to download and process on its own--it usually takes a couple of weeks to quietly catch up.</b></p>
<p>You can watch more detailed synchronisation progress in the <i>services->review services</i> window.</p>
<p><img src="tag_repo_review.png" /></p>
<p>Your new service should now be listed on the left of the manage tags dialog. Adding tags to a repository works very similarly to the local tags service except hitting 'apply' will not immediately confirm your changes--it will put them in a queue to be uploaded. These 'pending' tags will be counted with a plus '+' or minus '-' sign:</p>
<p><a href="rlm_pending.png"><img src="rlm_pending.png" width="960" height="540" /></a></p>
<p>Notice that a 'pending' menu has appeared on the main window. This lets you start the upload when you are ready and happy with everything that you have queued.</p>
<p>When you upload your pending tags, they will commit and look to you like any other tag. The tag repository will anonymously bundle them into the next update, which everyone else will download in a day or so. They will see your tags just like you saw theirs.</p>
<p>If you attempt to remove a tag that has been uploaded, you may be prompted to give a reason, creating a petition that a janitor for the repository will review.</p>
<p>I recommend you not spam tags to the public tag repo until you get a rough feel for the <a href="tagging_schema.html">tag schema</a>, or just lurk until you get the idea. It roughly follows what you will see on a typical booru. The general rule is to only add factual tags--no subjective opinion.</p>
<p>I recommend you not spam tags to the public tag repo until you get a rough feel for the <a href="https://github.com/CuddleBear92/Hydrus-Presets-and-Scripts/blob/master/tag%20guidelines">guidelines</a>, and my original <a href="tagging_schema.html">tag schema</a> thoughts, or just lurk until you get the idea. It roughly follows what you will see on a typical booru. The general rule is to only add factual tags--no subjective opinion.</p>
<p>You can connect to more than one tag repository if you like. When you are in the <i>manage tags</i> dialog, pressing the up or down arrow keys on an empty input switches between your services.</p>
<p><a href="faq.html#delays">FAQ: why can my friend not see what I just uploaded?</a></p>
<p class="right"><a href="getting_started_downloading.html">Read about downloading ---></a></p>
Expand Down
19 changes: 11 additions & 8 deletions include/ClientController.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,7 @@ def Exit( self ):
self.ShutdownView()
self.ShutdownModel()

if not HG.shutting_down_due_to_already_running:

HydrusData.CleanRunningFile( self.db_dir, 'client' )

HydrusData.CleanRunningFile( self.db_dir, 'client' )

else:

Expand Down Expand Up @@ -1512,6 +1509,15 @@ def THREADBootEverything( self ):

self.CheckAlreadyRunning()

except HydrusExceptions.ShutdownException:

self._DestroySplash()

return


try:

self._last_shutdown_was_bad = HydrusData.LastShutdownWasBad( self.db_dir, 'client' )

HydrusData.RecordRunningStart( self.db_dir, 'client' )
Expand Down Expand Up @@ -1568,10 +1574,7 @@ def THREADExitEverything( self ):

self.pub( 'splash_set_title_text', 'cleaning up\u2026' )

if not HG.shutting_down_due_to_already_running:

HydrusData.CleanRunningFile( self.db_dir, 'client' )

HydrusData.CleanRunningFile( self.db_dir, 'client' )

except ( HydrusExceptions.InsufficientCredentialsException, HydrusExceptions.ShutdownException ):

Expand Down
5 changes: 3 additions & 2 deletions include/ClientDaemons.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,13 @@ def wait_for_free_slot( controller, subs_jobs, max_simultaneous_subscriptions ):

p1 = controller.options[ 'pause_subs_sync' ]
p2 = HydrusThreading.IsThreadShuttingDown()
p3 = controller.new_options.GetBoolean( 'pause_all_new_network_traffic' )

if p1 or p2:
if p1 or p2 or p3:

if HG.subscription_report_mode:

HydrusData.ShowText( 'Subscriptions cancelling. Global sub pause is ' + str( p1 ) + ' and sub daemon thread shutdown status is ' + str( p2 ) + '.' )
HydrusData.ShowText( 'Subscriptions cancelling. Global sub pause is {}, sub daemon thread shutdown status is {}, and global network pause is {}.'.format( p1, p2, p3 ) )


if p2:
Expand Down
25 changes: 15 additions & 10 deletions include/ClientGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ def __init__( self, controller ):

self._delayed_dialog_lock = threading.Lock()

self._last_total_page_weight = None

self._notebook = ClientGUIPages.PagesNotebook( self, self._controller, 'top page notebook' )

self._last_clipboard_watched_text = ''
Expand Down Expand Up @@ -1551,14 +1553,14 @@ def pages():

menu = wx.Menu()

if self._controller.new_options.GetBoolean( 'advanced_mode' ):
( total_active_page_count, total_closed_page_count ) = self.GetTotalPageCounts()
ClientGUIMenus.AppendMenuLabel( menu, HydrusData.ToHumanInt( total_active_page_count ) + ' pages open', 'You have this many pages open.' )
ClientGUIMenus.AppendSeparator( menu )
( total_active_page_count, total_closed_page_count, total_active_weight, total_closed_weight ) = self.GetTotalPageCounts()

self._last_total_page_weight = total_active_weight + total_closed_weight

ClientGUIMenus.AppendMenuLabel( menu, '{} pages open'.format( HydrusData.ToHumanInt( total_active_page_count ) ), 'You have this many pages open.' )
ClientGUIMenus.AppendMenuLabel( menu, 'total session weight: {}'.format( HydrusData.ToHumanInt( self._last_total_page_weight ) ), 'Your session is this heavy.' )

ClientGUIMenus.AppendSeparator( menu )

ClientGUIMenus.AppendMenuItem( self, menu, 'refresh', 'If the current page has a search, refresh it.', self._Refresh )

Expand Down Expand Up @@ -4761,7 +4763,10 @@ def GetTotalPageCounts( self ):

total_closed_page_count = len( self._closed_pages )

return ( total_active_page_count, total_closed_page_count )
total_active_weight = self._notebook.GetTotalWeight()
total_closed_weight = sum( ( page.GetTotalWeight() for ( time_closed, page ) in self._closed_pages ) )

return ( total_active_page_count, total_closed_page_count, total_active_weight, total_closed_weight )


def IShouldRegularlyUpdate( self, window ):
Expand Down Expand Up @@ -4981,7 +4986,7 @@ def PresentImportedFilesToPage( self, hashes, page_name ):
return


dest_page = self._notebook.PresentImportedFilesToPage( hashes, page_name )
self._notebook.PresentImportedFilesToPage( hashes, page_name )


def ProcessApplicationCommand( self, command ):
Expand Down

0 comments on commit a04a5c2

Please sign in to comment.