With the following script, running on a record without thumbnail,
(() => {
const app = Application("DEVONthink 3");
const rec = app.getRecordWithUuid('x-devonthink-item://7A491EA9-A07C-4DA9-8A2F-7CF2A0E66812');
console.log(`Thumbnail is ${rec.thumbnail()}`);
const createResult = app.createThumbnail({for: rec});
console.log(`Thumbnail creation returned ${createResult}`);
})()
I see this output
Thumbnail is undefined
Thumbnail creation returned false
While the first line is obviously ok, I’m wondering why the return value of createThumbnail
is false
, although the thumbnail is created just fine, albeit asynchronously.
OTH, deleteThumbnail
returns false
if no thumbnail exists and true
otherwise. That seems sensible.