jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.94k stars 96 forks source link

Disable thumbnailing for mount #24

Open jstaf opened 5 years ago

jstaf commented 5 years ago

Upon mounting onedriver and viewing the mounted folder in Nautilus, Nautilus/GNOME will attempt to download every single file sequentially in order to thumbnail them. After some research it appears impossible to tell GNOME to ignore thumbnailing the mount (meaning that Nautilus will try to download everything on every mount, which is a huge bandwidth suck). However, if GNOME fails to create a thumbnail, it'll create a failed thumbnail and never retry. Perhaps we can create a failed thumbnail for every item in the drive on populating the cache to prevent Nautilus from downloading things when we don't want it to.

Ref: https://developer.gnome.org/gnome-desktop/stable/GnomeDesktopThumbnailFactory.html

jstaf commented 5 years ago

Mitigated this a bit by caching file contents on disk, so they only get downloaded once (as opposed to once per thumbnail).

hertz98 commented 6 months ago

Recent versions of Gnome Nautilus (not sure at the time of the issue) have the option to ignore thumbnails generation on remote filesystems. Unfortunately it seems glib determine if the file is in a remote location using the _is_remote_fstype function, comparing the string returned from _g_unix_mount_get_fstype with hard coded strings, so only nfs, nfs4, cifs, smb, smb2, fuse.sshfs filesystem types are considered remote

jstaf commented 6 months ago

I didn't realize that was what the issue was. Might be worth submitting a patch to glib or something.