TagStudioDev / TagStudio

A User-Focused Photo & File Management System
https://docs.tagstud.io/
GNU General Public License v3.0
5.28k stars 376 forks source link

[Feature Request]: Prevent automatically pulling the whole file from OneDrive #402

Open orels1 opened 3 months ago

orels1 commented 3 months ago

Checklist

Description

I've been looking for a nice solution to handle tagging of my photos, screenshots, and 3d modeling references for ages, and TagStudio is incredibly promising thus far.

The issue I encountered, however, is that I'm using OneDrive to offload some of the rarely used files into the cloud from my PC, and TagStudio's current thumbnail rendering is doing a full file pull at the moment.

I looked through issues, docs and discussions and only found a single mention of a "do not render thumbnails" option brought up in this PR by a person who seemingly had a similar issue. But it doesn't seem like that option is in the current release version of TagStudio.

For now I had to block the app from being able to pull files, just so it doesn't download hundreds of gigabytes of things during initial indexing. But it is not really a usable workaround.

Solution

If possible, TagStudio should leverage Windows APIs to pull the low res thumbnails similar to Explorer, in a OneDrive folder.

Alternatives

If its possible to detect files that aren't on disk (they report 0 bytes size on disk in file properties, maybe that can be leveraged) - an option to just skip rendering thumbnails for those files could be a useful interim workaround.

image

Extra notes

This is also relevant for other similar systems, e.g. Proton Drive

CyanVoxel commented 3 months ago

Disabling thumbnail rendering is an option I've been meaning to have. The disk size observation is a good call, that could make it easier to implement an additional "Disable thumbnail rendering on network/cloud drives" option so there's less need to go back and forth toggling it between local and non-local libraries. Leveraging the OS's APIs for thumbnails is also something that we've been meaning to explore for fallback options, but this is another good reason to look into them.

rfletchr commented 2 months ago

@CyanVoxel rather than investing time writing code that tries to detect network drives, and cloud managed directories It might make sense to simply allow the user to provide a list of directories which will be ignored by thumbnail generation.

That way you have a very general purpose feature which gives people control, and it'll take less code.

The alternative is trying to write code that works for 3 platforms, and n number of cloud providers.

orels1 commented 2 months ago

The 0 bytes part would be a nice QoL component simply because you can have only some sub-folders synced via a cloud provider inside a single over-arching library, so you don't need to add every folder one by one to the ignore list.

But at the end of the day, having a way to do it would be better than not having any.

Although the best solution to all of this would be to fall back to the OS APIs for thumbnails. So then those files could still be searched through nicely.