kampidh / jxl-batch-converter

A simple GUI for libjxl binaries
GNU General Public License v3.0
28 stars 1 forks source link

Strange and unpredictable program behavior #8

Closed Ukhryuk-Hai closed 5 months ago

Ukhryuk-Hai commented 5 months ago

First, I’ll say thank you for taking into account the wishes last time and improving the converter.

So, I decided to test the new functions and this is what happened, I’ll tell you in order:

  1. I added a folder with several PNG files, activated the option "use the same folder for output". Started the process. Now the folder contains the same files in JXL format.

  2. Without changing anything, I started the process again. The converter skipped all the files, reporting that they already existed.

  3. Now again, but with the "Output file suffix" option activated, I wrote "%rnd%" in the input field. As a result, I received files like "file-123456.jxl". Here I immediately had several comments:

A) "%rnd%" you'd better add to the corresponding input text field so that it is the default and also as an example. Otherwise, most users probably won't even know about this feature.

B) "%rnd%" already contains "-". I think it would be better if this thing generated only random characters, without the "-". And the input field will contain "-%rnd%" by default. This way, those who prefer "_" can use it by simply editing it to "_%rnd%" or whatever.

C) With some surprise, I discovered that the sequence of characters is not generated every time for each file, but is the same for the conversion session. In general this is not important, it just seems to me that the point of making it unique is to make it truly unique - that is, for each file.

D) It is advisable to add a setting for the length of the sequence of characters 4-8, for example "%rnd4%" will create 4 characters, and "%rnd8%" - accordingly 8. Probably, 4 characters will be enough for most users. (However, you can safely ignore this, I just tend to notice flaws and like to finish everything to the ideal).

  1. I launched it again, the process went as expected, creating several files with a different set of characters.

  2. I disabled the "Output file suffix" option and ran it again. The program should have skipped existing files (which were created during the first conversion), but instead I saw something like "file-%rnd%.jxl" in the folder. This is definitely a bug.

  3. One more time. Now the program reported that files with the same name (with the suffix "-%rnd%.jxl") already exist and skipped them.

kampidh commented 5 months ago

Ack, thanks for the further testing! Fixing it now..

Answering some of the points above: A) It's already documented on release notes and shown on a tooltip when you hover over the suffix field. B) Reserved for the next fix. C) Yes, it is intentional that the randomized string is unique per-batch, not per-file. As it basically serves as a unique batch token.

kampidh commented 5 months ago

Fixed in: https://github.com/kampidh/jxl-batch-converter/releases/tag/v0.5.1

Edit: Might as well check for 0.5.2, since I added hashed string option for better parameter tracking: https://github.com/kampidh/jxl-batch-converter/releases/tag/v0.5.2