Quick thumbnails preview on RCX

How i can speed up the thumbnails preview in Google drive on RCX (Android rclone client) ?
RCX is perfect. it only lacks the quick preview of the image files and PDF.

The Google drive application weighs 60MB.

hello and welcome to the forum,

the author is a fellow rcloner, i will try to summon @x0b

Unfortunately, this is not something where RCX or rclone can do much.

If you use a provider app, for example Google Drive, the provider can generate thumbnails on their server and send them to your smartphone. RCX on the other hand has to download your files, and then generate a preview image for each file. This requires bandwidth and processing power, which mobile devices are generally lacking.

PDFs are a different can of worms. I think RCX would need to add a whole PDF reader for that to work.

why not use a google drive webview or a background cURL script that browses the folder and downloads the thumbnails for the corresponding files ?

This would need a new interface in rclone.

We could (for example) make a new backend command for reading a thumbnail (these are available over the rc too). There are quite a few providers which could implement it. RCX could call that if it was available.

That changes the situation. If rclone gets a thumbnail command, RCX will probably use it. With an RC interface, we could push that directly to the image loading library.

How does rcx interface with rclone? Is it over the API?

I guess ideally you'd want the thumbnails being returned inline, not to temporary files?

RCX still uses the command line, but I'm in the process of moving everything to RC (tracking issue).

Yes, that would allow RCX to load thumbnails as the user scrolls by. RCX currently starts a rclone serve http for that purpose.If inline is too complicated, regular files should work as well. RCX caches thumbnails anyway.

Here is how you fetch a thumbnail in the google drive API

I've noticed similar APIs for photos / onedrive in passing.

The easiest thing for rclone to do would be to return the thumbnail in the API response as part of the JSON blob.

This implies a new Thumbnail interface on Object to read the thumbnails.

I don't know whether it is possible to set the size of the thumbnail you want.

Any reasonable size should work, RCX needs to re-scale the image anyway depending on display DPI. The thumbnail request command could contain a size hint parameter though, to select the closest in case there are multiple available.

Agreed, at the sizes we're taking about here - 10-15 KiB for 176x176 px in a quick test - that is not a problem, even with Base64 overhead.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.