using flash in fullscreen view
Flash files are sometimes interested in inputs (like spacebar or mouse-scrollwheel) that mean something to hydrus's fullscreen view, and the libraries I have to use to show flash don't handle these events like normal windows. I now have it set so if your mouse is inside the flash window, the input will go to the flash, and if it is outside, it goes to the fullscreen window. Unless the flash is set otherwise, your mouse cursor should show up when it moves into the flash window.
So, if you want to play a flash game in fullscreen, keep your mouse inside the window. If you want to filter some flash files real quick, keep your cursor at the edge of your screen.
exclude deleted files
In the client's options is a checkbox to exclude deleted files. It occurs again pretty much anywhere you can import, under 'advanced import options'. If you select this, any file you ever deleted will be excluded from all future remote searches and import operations. This can stop you from importing/downloading and filtering out the same bad files several times over. The default is off. You may wish to have it set one way most of the time, but switch it the other just for one specific import or search.
importing and adding tags at the same time
Add tags before importing on file->import files lets you give tags to the files you import en masse, and intelligently, using regexes that parse filename:
This should be somewhat self-explanatory to anyone familiar with regexes. I hate them, personally, but I recognise they are powerful and exactly the right tool to use in this case. This is a good introduction, if you are not certain about regexes.
Once you are done, you'll get something neat like this:
Which you can more easily manage by collecting:
Collections have a small icon in the bottom left corner. Selecting them actually selects many files (see the status bar), and performing an action on them (like archiving, uploading) will do so to every file in the collection. Viewing collections fullscreen pages through their contents just like an uncollected search.
Here is a particularly zoomed out view, after importing volume 2:
Importing with tags is great for long-running series with well-formatted filenames, and will save you literally hours' finicky tagging.
custom filter
Once you are comfortable with the client's tagging and rating, you may be interested in performing a custom filter, which is essentially the fullscreen browser with custom shortcuts. You select it from the regular thumbnail right-click menu. First, it will show you a dialog:
Which has a sub-dialog to add and edit actions:
You can reassign the default shortcuts for regular things, like archive/delete and opening tag/ratings dialogs, and also add shortcuts for adding/removing a tag or setting/unsetting a rating. Shortcuts do not yet combine; they overwrite.
Once you hit ok on the parent dialog, the fullscreen browser will launch. Navigation and zooming happens as normal with the mouse and keyboard, unless you have overwritten a shortcut! Hitting any of the shortcuts you declared should carry out the action. Tags will pend/rescind pend or petition/rescind petition or add/delete as appropriate to the type of tag service and the tag's status for the particular file.
The shortcuts you set will be active only for that session; they will be forgotten as soon as you close the browser. This behaviour may change, if people desire it. (remembering the last settings, or having favourites, maybe? send me your thoughts.)
finding duplicates
system:similar_to takes two arguments: a hash and an integer representing max hamming distance (0 means exactly the same, 64 means everything. 5 is good for finding dupes). You can quick-select it from a file's right-click menu. It returns all images that are very similar to the hash. For example:
Here are a couple of duplicates, found despite their different resolution.
And some images of similar shape but not colour.
If you are careful, you can find images that look only somewhat like your hash. You get a lot of false positives with hamming distance of much more than 12, though.
PIL errors
At some point, you will probably encounter a PIL error when importing a file. PIL is the Python Image Library, the code I use to manipulate image files. Some files are kooky, and just won't load with it. I can't fix these errors, since PIL is not mine. It would take me thousands of hours to write my own image library, and even then it would have its own odd errors. Just gotta deal with it.
If the PIL error'ing file is one you particularly care about, I suggest you import it into photoshop or similar and save it again. Photoshop should be clever enough to parse the file's weirdness, and then it'll hopefully save again to a simpler format which PIL, and hence the client, will be able to understand.
busted up gifs
Animated gifs are a real pain in the neck. There are several loopholes in the standard that permit odd palettes and colourspaces, and PIL has a hard time parsing it all.
So, some gifs will have a coloured first frame but grey frames thereafter; or they will have odd washy noise all over; or they will just be black. The file isn't broken, but lib is looking at it wrong. Every ten versions or so, I gather enough enthusiasm to fix a few more.
setting a password
the client offers a very simple password system, enough to keep out noobs. You can set it at database->set a password. It will thereafter ask for the password every time you start the program, and will not open without it. However none of the database is encrypted, and someone with enough enthusiasm or a tool and access to your computer can still very easily see what files you have. The password is mainly to stop idle snoops checking your images if you are away from your machine.
backing up
All of the client's files, mappings, service credentials, options, everything, are stored in the /db folder beneath the main install directory. If you want to back your data up, just turn off the client and copy the directory somewhere. Copy it back to restore.
The same is true of a server. Turn it off and copy the db folder, or send a backup command via the server admin menu and copy the resultant .db.backup files and relevant subdirectories.
the client's server
The client runs a very simple http server. I want to do much more with it in future.
When you boot the client, it will try to host a service on port 45865, which will respond to /file and /thumbnail requests just like a file repository, but without needing an access key, and only to localhost (127.0.0.1).
For instance, the following image (6c0ae65894c7a5ffd686f54cc052326b8ea188a691a1895b2f88b7c60a07f13f.jpg, in the help dir) is served here from disk:
And here it will attempt to load from the client:
For more information, check the image's two urls. It will of course only display in the second case if you import it to the client and have it running when you load this page. You can copy the second image's url and replace the hash with that of any other image or swf in your collection and it should work.
Needless to say, this starts to break if you try to run several different copies of the client at once.
a note concerning memory usage
the client does a lot of caching. It eats plenty of memory, and if you go crazy you can crash the program. A default-sized 4000-strong thumbnail pane is really just a scrollable 250MB-ish bitmap, so opening up a dozen large searches will start pushing your OS's 32-bit upper memory limits. If you find the client crashing, slow down a little or reduce the max cache sizes and thumbnail dimensions in the options.
vacuum
After a lot of use, pretty much all of the client's database's pages will be fragged and inefficiently packed. If you think the client is running sluggish, going database->vacuum will rebuild the database entirely, making it as efficient as it can possibly be. It takes a minute or so.
If the db is sluggish even after a vacuum, please send me an email with your rough details. I am always interested in speeding up bad code.