Thumbnail file hash different

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Thumbnail file hash different

Post by klownboy »

Don, I noticed in testing a thumbnail script that if I have "Resolve cache path from current folder: checked and "Cache path" blank, I get a different hash value for the same folder and thumbnail size than if I have a "Cache path" specified of ?:\XYthumbs\ along with "Resolve cache path from current folder" checked. Shouldn't the hash value (in this case filenames (ini and dbits) as well) be the same regardless of where the cache is located? Is something else coming into play or is it a bug. The hash or ini filename is typically the [folder with backslash*thumbnail size] (e.g., I:\temp2\*128x128) unless it's a search or branch.

It's easy to test:
- place a few images in a temp folder with "Cache Path" blank and "Resolve cache path..." checked in Configuration. Build thumbs and look at the hash of the ini and dbits files in that folder.
- now change the "Cache path" to ?:\Xythumbs\ and leave "Resolve cache path from current folder" checked. Build thumbs (same size as above) and look at the filename hash values.

I'm not sure if I'm missing something, but shouldn't the hash be the same regardless of where they end up? The hash when ?:\XYthumbs\ is used in the "Cache path" I believe is incorrect. It seems to be the same hash value even on a different drive. I get 207c2a0865884c0b3a53c3bea5189c00.ini , the same hash on two different drives which obviously the image folders will be different. :veryconfused:

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

Yes, there is a subtle difference here. If the cache path is stated in a portable way (?:\Xythumbs\), then the file paths are also stored (hashed) in that way (with ? as drive letter) to make them portable as well.

But now I see that this was not a good idea because when all cache data files are stored in ?:\Xythumbs\ then we can get clashes if you have thumbs in D:\Pics and E:\Pics because they both are hashed as ?:\Pics. Hmm, guess I have to fix that.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

OK Don thanks. That's why I saw the same hash on a different drive. I noticed that the XYthumbs.txt files logged the cache files with the "?" when ?:\XYthumbs is specified and I should have tried that hash. When "Cache path" is empty and "Resolve cache path from current folder" is checked, the cache is stored in the image folder as documented using the actual drive letter.

When changing from one this cache configuration to another under certain circumstances (i.e., from "Resolve cache path from current folder" checked and "Cache path" specified to "Resolve cache path from current folder" checked and "Cache path" blank or visa versa), are the dbits file(s) deleted or moved to the new location, but the ini file remains where it was previously? Not that anyone should be doing this.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

Just wait for the next beta. There was some stupid bug that totally screwed the portability idea.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

admin wrote: ↑12 Sep 2022 13:18 Just wait for the next beta. There was some stupid bug that totally screwed the portability idea.
Sounds good Don. In my opinion, that portability idea, though good, could have only applied to a portable devices (i.e., removable devices). There it makes sense. Who needs thumbnail cache files in every image folder or in every specified folder on each drive when the drives are fixed.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

Portability was the wrong word, I should have said movability. Now you can move/copy your image folders around, even using other tools. The cache comes along.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

Yes, I can see that the movability is a great idea; that which would be accomplished best with "Resolve cache path from current folder " checked and "Cache Path" left blank. In that case, with the thumbnail caches being in the same folder as the images, they move with the image files. Personally though, I wouldn't bother using ?:\XYthumbs on fixed drives though.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

So, in beta 23.60.0011 with the softpath, when "Resolve cache path from current folder" is checked and no "Cache path" is specified, the hash MD5("SoftPath*96x96") will be MD5("*96x96") which results in a hash filenames being the same across drives or folders since no image folder name comes into play. As you stated, this results in complete movability since the folder has no bearing. I ran some tests using the same image files on a different drive and different folder names and the hash is the same. I also ran test varying the number of images in the image folder and the thumbnail cache file names (ini and dbits) were the same.

All that is fine, but when I changed the number of images in the folder, I'm not getting any change to contents of the ini or dbits files (i.e., the image count remains the same and the dbits file did not change in size). So I'm thinking something's not quite right with the beta change.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

Cannot see such a problem here. All new thumbs are cached, the count is raised, and the dbits file is written when it's time to write it.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

admin wrote: ↑12 Sep 2022 11:29 But now I see that this was not a good idea because when all cache data files are stored in ?:\Xythumbs\ then we can get clashes if you have thumbs in D:\Pics and E:\Pics because they both are hashed as ?:\Pics. Hmm, guess I have to fix that.
Well, I got that wrong! The ? in ?:\XYThumbs\ is not the same ? as in XY's portable path where it refers to the drive of XYplorer.exe! In ?:\XYThumbs\ it refers to the path of the image files with the thumbnails. So a clash is not possible, since each drive will have its own ?:\XYThumbs\ folder. So I will remove that "fix" from this morning. And yes, you will have two different hashes for the same path depending on the Thumbs Cache settings, one is soft with a "?" in place of the drive letter, one is hard (with the drive letter).

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

In my tests with v23.60.0011, when "Cache path" is blank, the softpath is always blank; when Cache Path" is "?:\XYthumbs", the "softpath" is the same as the "Path". So, your in next beta when "Cache path" is blank, the softpath will be "?:\imagefolder\" and the "Path" will reflect the actual path "D:\Imagefolder\" ? I never saw anything associated with the drive of XYplorer (in my case D:) and I was doing most tests on H: and I: drives.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

Yes. Very useful for carrying cached thumbs on a USB stick.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

klownboy wrote: ↑12 Sep 2022 15:51 when I changed the number of images in the folder, I'm not getting any change to contents of the ini or dbits files (i.e., the image count remains the same and the dbits file did not change in size). So I'm thinking something's not quite right with the beta change.
I still see what I mentioned above in betav23.60.0012...it looks like you have to specifically run "refresh thumbnails" for the ini and dbits file to be updated when deleting thumbnails form the image folder which is expected.

When adding files into the image folder, obviously XY builds the new thumbs, the ini is not updated to reflect the new number of images until a normal refresh is done.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail file hash different

Post by klownboy »

klownboy wrote: ↑12 Sep 2022 17:05 So, your in next beta when "Cache path" is blank, the softpath will be "?:\imagefolder\" and the "Path" will reflect the actual path "D:\Imagefolder\" ? You replied, Yes.
Hey again Don, in v23.60.0012, I'm still getting a blank SoftPath when the "Cache path" is blank. I thought it was going to be ?:\Image Folder\ ?

When "Cache Path" is ?:\XYthumbs\, I get a SoftPath of ?:\ImageFolder\. I was under the impression that in this case, SoftPath would be the actual folder, the same as Path.

admin
Site Admin
Posts: 67337
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail file hash different

Post by admin »

It makes sense as it is.

Cache path ?:\XYthumbs\ says: the path letter may change, so the image path has to be hashed as ?:\ImageFolder\

Empty cache path says: the whole path can change to anything, it does not matter what, so the image path has to be hashed as "" (nothing).

Post Reply