thumbnails: Tolerate absence of MTime and URI #230
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A change to the Thumbnail specification has recently been accepted that allows MTime and URI to be missing, in which case the thumbnail is regarded as always-matching.
To be precise, that change only altered the behavior for shared thumbnails, but that distinction is not made in pqiv so far, and I see no harm in accepting thumbnails with those properties if the creator saw fit to violate the thumbnail specification in that very precise way.
This change enables the use of montage mode on git-annex repositories where only the shared thumbnails are locally available (or other sparsely checked out media where the file can not be stat()ed but is seen in the listing). Further changes may enhance usability in such scenarios (for example, the
-1
family of arguments could be allowed in montage mode, and bound by the user to a command to actually fetch the image; behavior on entering an absent file could be altered to avoid that once you go back to montage mode the file doesn't show any more) -- but at any rate, this is a start, and is also beneficial for fully checked out media (eg. where MTime is just not reliable, but the creator had means of keeping shared thumbnails current).Details for the review: