Skip to content

Commit

Permalink
Version 566
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrusnetwork committed Mar 13, 2024
1 parent 7d4a835 commit 7bc49e9
Show file tree
Hide file tree
Showing 35 changed files with 664 additions and 285 deletions.
69 changes: 27 additions & 42 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ title: Changelog
!!! note
This is the new changelog, only the most recent builds. For all versions, see the [old changelog](old_changelog.html).

## [Version 566](https://github.com/hydrusnetwork/hydrus/releases/tag/v566)

### incremental tagging

* when you boot a 'manage tags' dialog on multiple files, a new `±` button now lets you do 'incremental tagging'. this is where you, let's say for twenty files, tag them from page:1->page:20. this has been a long time in the works, but now we have thumbnail reorganisation tech, it is now sensible to do.
* the dialog lets you set a namespace (or none), start point (e.g. you can start tagging at page:19 if you are doing the second chapter etc...), the step (you can count by +2 every file, instead of +1, or even -1 to decrement), the subtag prefix (so you can say 'page:insert-4' or something), and the subtag suffix (for, say, 'page:2 (wip)')
* the last namespace is remembered between dialog opens, and if the first file in the selection has a number tag in that namespace, that is the number the 'start' will initialise with. a bit of overlap/prep may save time here!
* the prefix and suffix are remembered between dialog opens
* a status text gives you a live preview of what you will be adding and says whether any of the files already have exactly those tags or have different tags under the same namespace (which would be possible conflicts, suggesting you are not lined up correct)

### misc

* added import support for .docx, .xlsx, and .pptx files (the Microsoft Open XML Formats). they get icons, not much else. they are secretly zips, so **on update, you will be asked if you want to scan your existing zips for these formats**
* when you move a window to another screen in a maximised state (e.g. on Windows you can do this with win+shift+arrow), the system that remembers window coordinates will now register and save this. the 'restore' window size is preserved from whatever it was on the previous screen while the 'restore' position will try to stay the same on the new monitor (e.g. if it was at (200, 400) on the old monitor, it will try to do the same on the new) as long as the window fits, otherwise it is moved to (20,20) on the new screen
* the 'edit string converter' panel no longer requires you to enter an example text that can be converted. you can see the error on the dialog, so if you don't want to fix it, or you just need to nip in and out testing things, it is now up to you
* if the database takes a long time to update, the 'just woke up from sleep' state should no longer trigger. the system thought the long weird early delay was the computer going to sleep
* the system that gives a popup and then a dialog when you have 165+ (and then 500+ or so) pages open is now removed. this was always a wx thing primarily, and Qt is much happier about having a whole load of UI elements. the main problem here is now memory blot and UI-update lag. this is now in the user's hands alone, no more bothering from me (unless it becomes a new problem, and I'll figure out a better warning test/system)

### boring code cleanup

* neatened how some manage tags ui is initialised. there's a hair of a chance this fixes the 'the manage tags dialog taglist is cut off sometimes' bug
* neatened how some pending content updates are held in manage tags
* manage tags dialogs now receive their media list in the same order as the underlying thumbnail selection, ha ha ha
* untangled some of the presentation import options. stuff like 'is new or in inbox' gets slightly better description labels and cleaner actual logic code
* fixed some type issues, some typo'd pubsubs, and other misc linting
* tried last week's aborted github build update again. the build is now Node 20 compatible

## [Version 565](https://github.com/hydrusnetwork/hydrus/releases/tag/v565)

### tag sorting bonanza
Expand Down Expand Up @@ -415,45 +442,3 @@ title: Changelog
* fixed a typo that was causing too much work in the updated file info manager call (and was often returning 'null' results for half-cached `file_metadata` requests with `only_return_basic_information=true`)
* thanks to a user, the `/add_urls/get_url_info` Client API call now has a cache timeout of ten minutes, and the `/add_urls/get_url_files` call now has a timeout of 30 seconds if all the files are 'already in db'. this should automatically reduce some overhead for several programs that talk to the Client API a lot about URLs
* the client api version is now 58

## [Version 556](https://github.com/hydrusnetwork/hydrus/releases/tag/v556)

### misc

* fixed, on a file drag and drop, the new export path eliding code from raising an error when the default export phrase would give an empty filename. e.g. if you set the export phrase as `[title]` and the file has no title. this no longer raises an error, and the fallback export phrase `{hash}` is again used instead. broadly speaking, most errors here are now handled better
* also, export folders will now fallback to using `{hash}` if their normal export filename raises an error
* holding down ctrl+shift+ while selecting thumbnails now does the same thing as a bare shift+ select. previously, it was unhelpfully interpreting this as a bare ctrl+ click
* I may have improved the stability of 'minimise to system tray'. this thing still hangs the UI for some users on a delayed restore, I do not for certain know why
* thanks to a user who figured out the new build script, the Docker package is now on Alpine 3.19, with more and newer python library support along with it

### forced filetypes

* you can now force files' filetypes. hit _right-click->manage->force filetype_ on thumbnails or the media viewer, and you'll get a new dialog that lets you force-reassign those files to be considered something else. changes take place immediately, and files are renamed on disk with their new file extensions, making 'open externally' work nicely. the original filetype is remembered, so this can be undone easily through the same dialog
* this is happening because of the cbz/zip/Ugoira work, where the distinction between one format and another is not always perfect. the tech will also be useful for 'arbitrary file import' support. in any case, if there is something you want to force one way or another, it should now be easy
* searching for system:filetype will recognise the forced filetypes, but there may be other, more advanced areas of the program that should but do not. please let me know how you get on!
* there is a new system predicate, `system:has/no forced filetype`, that lets you further filter for the files that have this set or not. it is under `system:file properties`. it is also parsable if you ever need to type it
* if a file gets a metadata rescan and becomes a different filetype, this affects the original filetype and not the forced. if they are now both the same, no big problem
* as a side thing, I cleaned up how file metadata is put together in the database during file search. we were in a limbo state a little while ago, with an api call that just needed limited data, but I was never comfortable with it. now everything goes through the same routine, and every 'file info manager' is fully fleshed out, no matter the caller
* _yes, if you set a zip as a jpeg, you are going to get weird errors when you click on them. I'll iron these things out a bit--and have already added several quick safety checks for apparent image files without resolution and so on--and I am interested in reports, but for the most part, don't be stupid here and you won't end up in a bad place_

### filetypes

* **you will be asked on update if you would like to regenerate all your animated GIF and APNG thumbnails. The new x%-in and transparency tech seems to be working well, so I'm rolling out the full regen to everyone**
* before verifying a zip is an Ugoira or a cbz, the client now test-reads the cover page it will use as a thumbnail just to make sure it isn't passworded or corrupt or whatever
* thanks to a user, the test for whether a a zip is encrypted is much faster and neater now
* if there is an obvious video in a zip file, this is now dispositive to it not being considered a cbz
* all cbz and Ugoira are going to get a metadata scan again to account for these stricter rules

### Mr. Bones/file history chart

* **if you have had some dodgy inbox/archive numbers in your file history chart, please check again and let me know what you see. if the numbers are still bad, try changing the search from the 'all my files'/'system:everything' default--any better?**
* fixed Mr. Bones undercounting deleted files on some very old clients (i.e. mine)
* improved accuracy of some archive/inbox time calculations for the file history chart by adjusting archive times to the file service removal time of that file, if it is earlier
* included some additional de-inbox events that were being missed in the file history chart by recognising that files in the inbox but removed from a domain are nonetheless a decrement to the inbox count
* on update, some old invalid archive records will be deleted, which will also help the file history chart

### boot error handling

* if you start the program with client.db/server.db but missing any of the auxiliary databases, the program now stops you before the new file creation starts with a blocking message saying what has happened. it advises whether you should quit the process now to diagnose the hard drive fault or attempt to continue with reconstruction
* if you start the program with client.db/server.db but the 'version' table is missing, you now get a special blocking message before the main db creation routine starts saying what has happened. it advises whether you should quit the process now to diagnose the hard drive fault or attempt to continue with initial creation
* the server gets a bit of 'safe blocking show message' tech this week, which prints this info to the console and asks for the user to hit enter to continue
17 changes: 10 additions & 7 deletions docs/filetypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ The filetype for a file can be overridden with `manage -> force filetype` in the

## Applications

| Filetype | Extension | MIME type | Thumbnails | Viewable in Hydrus | Notes |
| -------- | --------- | ------------------------------- | :--------: | :----------------: | ----------------------------------------------------------------- |
| flash | `.swf` | `application/x-shockwave-flash` ||| |
| pdf | `.pdf` | `application/pdf` ||| 300 DPI assumed for resolution. No thumbnails for encrypted PDFs. |
| epub | `.epub` | `application/epub+zip` ||| |
| djvu | `.djvu` | `image/vnd.djvu` ||| |
| rtf | `.rtf` | `application/rtf` ||| |
| Filetype | Extension | MIME type | Thumbnails | Viewable in Hydrus | Notes |
|----------|-----------|-----------------------------------------------------------------------------| :--------: | :----------------: | ----------------------------------------------------------------- |
| flash | `.swf` | `application/x-shockwave-flash` ||| |
| pdf | `.pdf` | `application/pdf` ||| 300 DPI assumed for resolution. No thumbnails for encrypted PDFs. |
| epub | `.epub` | `application/epub+zip` ||| |
| djvu | `.djvu` | `image/vnd.djvu` ||| |
| docx | `.docx` | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` ||| |
| xlsx | `.xlsx` | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` ||| |
| docx | `.pptx` | `application/vnd.openxmlformats-officedocument.presentationml.presentation` ||| |
| rtf | `.rtf` | `application/rtf` ||| |


## Image Project Files
Expand Down
24 changes: 24 additions & 0 deletions docs/old_changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@
<div class="content">
<h1 id="changelog"><a href="#changelog">changelog</a></h1>
<ul>
<li>
<h2 id="version_566"><a href="#version_566">version 566</a></h2>
<ul>
<li><h3>incremental tagging</h3></li>
<li>when you boot a 'manage tags' dialog on multiple files, a new `±` button now lets you do 'incremental tagging'. this is where you, let's say for twenty files, tag them from page:1->page:20. this has been a long time in the works, but now we have thumbnail reorganisation tech, it is now sensible to do.</li>
<li>the dialog lets you set a namespace (or none), start point (e.g. you can start tagging at page:19 if you are doing the second chapter etc...), the step (you can count by +2 every file, instead of +1, or even -1 to decrement), the subtag prefix (so you can say 'page:insert-4' or something), and the subtag suffix (for, say, 'page:2 (wip)')</li>
<li>the last namespace is remembered between dialog opens, and if the first file in the selection has a number tag in that namespace, that is the number the 'start' will initialise with. a bit of overlap/prep may save time here!</li>
<li>the prefix and suffix are remembered between dialog opens</li>
<li>a status text gives you a live preview of what you will be adding and says whether any of the files already have exactly those tags or have different tags under the same namespace (which would be possible conflicts, suggesting you are not lined up correct)</li>
<li><h3>misc</h3></li>
<li>added import support for .docx, .xlsx, and .pptx files (the Microsoft Open XML Formats). they get icons, not much else. they are secretly zips, so **on update, you will be asked if you want to scan your existing zips for these formats**</li>
<li>when you move a window to another screen in a maximised state (e.g. on Windows you can do this with win+shift+arrow), the system that remembers window coordinates will now register and save this. the 'restore' window size is preserved from whatever it was on the previous screen while the 'restore' position will try to stay the same on the new monitor (e.g. if it was at (200, 400) on the old monitor, it will try to do the same on the new) as long as the window fits, otherwise it is moved to (20,20) on the new screen</li>
<li>the 'edit string converter' panel no longer requires you to enter an example text that can be converted. you can see the error on the dialog, so if you don't want to fix it, or you just need to nip in and out testing things, it is now up to you</li>
<li>if the database takes a long time to update, the 'just woke up from sleep' state should no longer trigger. the system thought the long weird early delay was the computer going to sleep</li>
<li>the system that gives a popup and then a dialog when you have 165+ (and then 500+ or so) pages open is now removed. this was always a wx thing primarily, and Qt is much happier about having a whole load of UI elements. the main problem here is now memory blot and UI-update lag. this is now in the user's hands alone, no more bothering from me (unless it becomes a new problem, and I'll figure out a better warning test/system)</li>
<li><h3>boring code cleanup</h3></li>
<li>neatened how some manage tags ui is initialised. there's a hair of a chance this fixes the 'the manage tags dialog taglist is cut off sometimes' bug</li>
<li>neatened how some pending content updates are held in manage tags</li>
<li>manage tags dialogs now receive their media list in the same order as the underlying thumbnail selection, ha ha ha</li>
<li>untangled some of the presentation import options. stuff like 'is new or in inbox' gets slightly better description labels and cleaner actual logic code</li>
<li>fixed some type issues, some typo'd pubsubs, and other misc linting</li>
<li>tried last week's aborted github build update again. the build is now Node 20 compatible</li>
</ul>
</li>
<li>
<h2 id="version_565"><a href="#version_565">version 565</a></h2>
<ul>
Expand Down
2 changes: 0 additions & 2 deletions hydrus/client/ClientApplicationCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusGlobals as HG
from hydrus.core import HydrusExceptions
from hydrus.core import HydrusSerialisable
from hydrus.core import HydrusTime

from hydrus.client import ClientConstants as CC
from hydrus.client import ClientGlobals as CG

SIMPLE_ARCHIVE_DELETE_FILTER_BACK = 0
Expand Down
2 changes: 1 addition & 1 deletion hydrus/client/ClientController.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ def qt_code_gui():

self.RestartClientServerServices()

job = self.CallRepeatingQtSafe( self, 10.0, 10.0, 'repeating mouse idle check', self.CheckMouseIdle )
job = self.CallRepeatingQtSafe( self.gui, 10.0, 10.0, 'repeating mouse idle check', self.CheckMouseIdle )
self._daemon_jobs[ 'check_mouse_idle' ] = job

if self.db.IsFirstStart():
Expand Down
4 changes: 2 additions & 2 deletions hydrus/client/ClientFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1835,11 +1835,11 @@ def UpdateFileModifiedTimestampMS( self, media, modified_timestamp_ms: int ):

os.utime( path, ( existing_access_time, modified_timestamp ) )

HydrusData.Print( 'Successfully changed modified time of "{}" from {} to {}.'.format( path, HydrusTime.TimestampToPrettyTime( existing_modified_time ), HydrusTime.TimestampToPrettyTime( modified_timestamp ) ))
HydrusData.Print( 'Successfully changed modified time of "{}" from {} to {}.'.format( path, HydrusTime.TimestampToPrettyTime( int( existing_modified_time ) ), HydrusTime.TimestampToPrettyTime( int( modified_timestamp ) ) ))

except PermissionError:

HydrusData.Print( 'Tried to set modified time of {} to file "{}", but did not have permission!'.format( HydrusTime.TimestampToPrettyTime( modified_timestamp ), path ) )
HydrusData.Print( 'Tried to set modified time of {} to file "{}", but did not have permission!'.format( HydrusTime.TimestampToPrettyTime( int( modified_timestamp ) ), path ) )



Expand Down
Loading

0 comments on commit 7bc49e9

Please sign in to comment.