bleakgrey / tootle

GTK-based Mastodon client for Linux
GNU General Public License v3.0
404 stars 61 forks source link

Images should be saved to XDG Cache #279

Closed cherti closed 3 years ago

cherti commented 3 years ago

What should happen:

Images downloaded for display via external image viewer should go to $XDG_CACHE_HOME/Tootle as they are not intended to be handled by the user manually and are outside of the user's data folder (or at least their view of it) this way.

What happened instead:

Images downloaded for display via external image viewer go to $XDG_DOWNLOAD_DIR/Tootle (not necessarily via this env variable, that's merely my assumption here).

How to reproduce:

  1. open tootle
  2. click on a picture within a toot
  3. check the according directories

Build context:

Logs seem untinteresting, they already list the resolved URI with the downloads-directory in place.

bleakgrey commented 3 years ago

Not really a bug, but an intended behavior.

Should all attachments be treated as cache though? Cached files imply that they shouldn't be visible, but the user explicitly downloads them to, say, I don't know, share an occasional meme.

cherti commented 3 years ago

I see how this came to pass. So from my point of view, I simply want to view the media. I only download it because that's how it works in Tootle, as far as I could tell (but maybe I'm doing it wrong?). So when I use Mastodon's webclient and I click on Media, I get it displayed right in the browser. I did expect tootle to do the same and I assumed that the current behavior was simply a way to avoid the need to implement inline-display for every media type possible right in tootle. This impression is, I think, also reinforced by the fact that tootle calls xdg-open (or an equivalent) on that file right away, furthering the impression that the click was intended for display instead of saving to disk.

Hence, I have neither the need nor the desire to save them to disk longterm for 99% of all media types. Question would be how this would be handled best then.