Skip to content

Index: Don't use *.thm thumbnail files as primary image #3900

Description

@pgalbavy

1. What is not working as documented?

As per yesterday's conversation, I have many old Canon CRW/THM photo sets. PP is seeing the THM as JPEG as making that primary even though it is only 160x120 in size.

I then added *.thm to .ppignore which correctly skipped the THM files but then when processing the CRW files it added the THM back.

time="2023-11-20T15:30:18Z" level=info msg="index: ignored "2002-01-26 Tate Modern/CRW_9183.THM""
time="2023-11-20T15:30:18Z" level=info msg="index: added main jpg file '2002-01-26 Tate Modern/CRW_9183.THM'"
time="2023-11-20T15:30:18Z" level=info msg="index: stacked related raw file '2002-01-26 Tate Modern/CRW_9183.CRW'"

In subsequent testing I found if I manually created larger JPEGs using photoprism convert -ext crw ... and I renamed the file to have THM instead of CRW, the index picked up the new JPEG:

$ mv CRW_8897.CRW.jpg CRW_8897.THM.jpg

...
INFO[2023-11-20T16:25:52Z] index: updated main jpg file '2002-01-02 Dunstable Downs/CRW_8896.THM'
INFO[2023-11-20T16:25:52Z] index: updated related raw file '2002-01-02 Dunstable Downs/CRW_8896.CRW'
INFO[2023-11-20T16:25:52Z] index: ignored "2002-01-02 Dunstable Downs/CRW_8897.THM"
INFO[2023-11-20T16:25:52Z] index: updated main jpg file '2002-01-02 Dunstable Downs/CRW_8897.THM'
INFO[2023-11-20T16:25:53Z] index: updated related raw file '2002-01-02 Dunstable Downs/CRW_8897.CRW'
INFO[2023-11-20T16:25:53Z] media: created 11 thumbnails for '2002-01-02 Dunstable Downs/CRW_8897.THM.jpg' [804.847715ms]
INFO[2023-11-20T16:25:53Z] index: stacked related jpg file '2002-01-02 Dunstable Downs/CRW_8897.THM.jpg'

2. How can we reproduce it?

  1. Add CRW/THM files and index.
  2. Review logs, see above behaviour.

3. What behavior do you expect?

I would expect the THM file to be ignored unless "Preview files" is explicitly disabled.

In the second instance I would expect the .ppignore entry to result in the files being ignored for all stages of processing.

4. What could be the cause of your problem?

Quick browse of code shows remnants of THM files not being classes as valid JPEGs but from discussion it may be this code path is no longer used.

5. Can you provide us with example files for testing, error logs, or screenshots?

Sampler files submitted as requested via email.

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: amd64 on docker with :latest

(b) Database Type & Version: MariaDB from docker :latest

(c) Operating System Types & Versions: Ubuntu 22.04 LTS, docker CE 24.0.2

(d) Browser Types & Versions: Chrome / Edge

(e) Ad Blockers, Browser Plugins, and/or Firewall Software? Lots. Not relevant.

7. On what kind of device is PhotoPrism installed?

Generic i7, 8GB, SSD for root and PP storage, btrfs on external spinning rust for originals.

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

NGINX with Letsencrypt in another docker container on an RPI4

Metadata

Metadata

Assignees

Labels

releasedAvailable in a stable release

Type

No type

Projects

Status
Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions