Repository navigation
Conversation
[Medium impact] The PR appears safe to merge, with the previous percent-path finding fixed and no new actionable issues found. SummaryThis PR brings row thumbnails closer to grid thumbnails and makes external thumbnailers more reliable.
The numbered percent-path finding is fixed. The earlier helper-cleanup, RAW-orientation, and PDF-hint cases are also addressed. No new actionable issues were found. Tests were read, not run.
|
1d140b2 to
c171add
Compare
A cache entry or failure marker was trusted on its modified time alone, so one made for another file with the same time was shown as this file's. It now has to carry this file's Thumb::URI as well, as the thumbnail spec asks a reader to check.
c171add to
05e4b40
Compare
Failure markers went to fail/folio, so a file Folio could not thumbnail stayed blank after it learned to, as it does for camera RAW here. They now go to the spec's fail/<program>-<version>, as fail/folio-2: the number is raised whenever Folio learns to draw more.
A thumbnailer that names a type only by an alias never matched the canonical name Folio asks with, so glycin's image/x-dds left a DDS file blank. The declared types are resolved to canonical names once, when the thumbnailers are read.
A CR2, NEF, NRW, ARW, SR2, DNG or PEF showed a blank tile unless a RAW thumbnailer was installed. The camera stores a finished JPEG in each, and a bounded reader of the TIFF directories now finds the largest one. An installed thumbnailer still answers first.
A type with no installed thumbnailer showed a blank tile and nothing else. The details pane now says which optional package draws it, from the types ffmpegthumbnailer, papers, glycin and libgsf declare.
A file nothing installed could draw kept its failure marker, so a thumbnailer installed afterwards never ran for it. The marker now records the thumbnailer the type had, none included, and holds the file back only while that is unchanged.
One orientation was kept for the whole file, so a preview whose directory names a turn of its own was turned by IFD0's instead. Each embedded JPEG now carries its directory's orientation, and takes the file's only when its directory names none.
With Poppler installed and no PDF thumbnailer, a PDF that failed to draw (damaged, or locked with a password) had the details pane name papers as missing. A PDF's package is now named only when pdftoppm is not there either.
The list and the columns asked for a thumbnail only for a photo or a video, so a PDF, a song with a cover or a document had its picture in the grid and an icon in a row. A row now asks for every picture a tile shows but a text file's page, which says nothing at a row's size, and a page or a cover is fitted whole in the row where a photo is cropped.
A thumbnailer's command was filled in one code after another, so a file called 50%off.mp4 had the %o in its own name replaced by the output path. The thumbnailer was sent a file that is not there, and the failure was remembered. Each code is now read once.
05e4b40 to
414271d
Compare
A failure marker keeps every app from trying a file again, and one was written for a thumbnailer that never started, for a spec whose program is not installed, for a file that could not be read and for one moved away or written to during the run. None of those says the file is broken, so none is remembered now, and a PDF whose thumbnailer cannot start is left to pdftoppm.
A thumbnailer still running after 15 seconds was killed alone, so the programs it had started (glycin and the office thumbnailer start their own) ran on. Each now runs in a session of its own, under a keeper that stops the whole session past its time, and when Folio itself is gone.
414271d to
b10ad6b
Compare
|
Thank you, @thisisgm! This one is continued in #67, stacked on #66 (your #17), from a branch here with your commits kept as you made them and you credited at the top. Added on top in review: quitting no longer waits on a running thumbnailer, what a thumbnailer leaves behind is stopped after every run rather than only on a timeout, a larger fresh thumbnail serves a smaller row, and the process tests hold in CI containers. Closing this one in favour of #67. |
Stacked on #17: its eight commits come first here, the last four are this pull request's, and I will rebase it as soon as #17 lands.
Four changes to thumbnails, one commit each with its own tests: a row in the list and the columns shows the picture its tile shows, a file whose name holds a thumbnailer code reaches the thumbnailer as it is, a failure is remembered only when the file itself was judged, and a thumbnailer past its time is stopped together with what it started. The suite goes from 199 to 204 tests. No library,
dependsoroptdependsentry is added.What you'd notice
50%off.mp4gets its thumbnail. A thumbnailer'sExecline was filled in one code after another, so the%oin the file's own name was replaced by the output path. The thumbnailer was sent a file that is not there and the failure was remembered. Each code is now read once, in one pass, and%%is a percent sign as the spec says.Execprogram is gone is no longer taken as a thumbnailer, so the details pane still names the package that would draw the type, and a PDF whose thumbnailer cannot start is left topdftoppm.Numbers
Measured on a mini PC, cold start, six runs a view, on a folder of 2,000 pictures and videos. These runs are from the rows commit before the rebase onto the current main, against the main of that day. The keeper adds one fork to each thumbnailer run; that is not in these numbers yet.
A folder of photos and videos asks for the same thumbnails as before, and the ranges overlap in every view. A folder of PDFs or music now draws its rows' pictures, which costs what the grid already paid for them.
Screenshots
The same folder in the list, main on the left and this branch on the right: the song shows its cover and the PDF its first page.
Tests
Five new cases, each failing without its commit: a row asks for the pictures a tile asks for and lays a fitted one out at its own shape; a name with every code in it reaches the thumbnailer whole, by path and by URI; no failure is remembered for a program that is gone, one that could not start, a file taken away or written to during the run or one that cannot be read, while a real failure still is, and
pdftoppmdraws the page when a PDF's thumbnailer cannot start; a thumbnailer past its time is stopped with the helper it started; and a thumbnailer and the helper it started are both ended when the process that started them is killed. Every commit builds and passes the suite on its own, also with a temp folder whose name has a space.