! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
tumbler generates thumbnails in a location where GLib won't find them
Status:
RESOLVED: FIXED
Product:
Tumbler
Component:
General

Comments

Description Jussi Kukkonen 2014-01-08 14:57:49 CET
Glib "thumbnail:path" file attribute is a nice way for apps to get the thumbnail path for a file (if one exists). Unfortunately GLib only looks for thumbnails in $XDG_CACHE_HOME/thumbnails since 2.34 so it will never find the thumbnails tumbler creates.

I think Tumbler should use that directory as well. I realize changes like this can be painful to change but $XDG_CACHE_HOME/thumbnails probably is the right place, and breakage is already happening: rygel currently does not show thumbnails but keeps calling tumbler unnecessarily.

I'm not sure where the conversion (moving existing thumbnails, possibly creating a temporary symlink ~/.thumbnails) should happen though. Maybe that is a distributor problem but I don't think they are currently too aware of this... So other solutions might be welcome too.



thumbnail move to XDG_CACHE_HOME: https://bugzilla.gnome.org/show_bug.cgi?id=675168
Comment 1 Yves-Alexis Perez editbugs 2014-01-08 16:54:37 CET
(In reply to Jussi Kukkonen from comment #0)
> I'm not sure where the conversion (moving existing thumbnails, possibly
> creating a temporary symlink ~/.thumbnails) should happen though. Maybe that
> is a distributor problem but I don't think they are currently too aware of
> this... So other solutions might be welcome too.

I honestly don't think tumbler should try to migrate anything to $XDG_CACHE_HOME/.thumbnails.

I don't know how other apps manage the thumbnails cache, but I have the impression that it's just not done (except maybe by the user, using rm -rf every once in a while).
> 
> 
> thumbnail move to XDG_CACHE_HOME:
> https://bugzilla.gnome.org/show_bug.cgi?id=675168

Somehow, I had the impression that tumbler already put the thumbnails in .cache/thumbnails. I think it should indeed be moved there in order to share the cache with everybody.
Comment 2 Jussi Kukkonen 2014-01-19 20:18:16 CET
(In reply to Yves-Alexis Perez from comment #1)
> (In reply to Jussi Kukkonen from comment #0)
> > I'm not sure where the conversion (moving existing thumbnails, possibly
> > creating a temporary symlink ~/.thumbnails) should happen though. Maybe that
> > is a distributor problem but I don't think they are currently too aware of
> > this... So other solutions might be welcome too.
> 
> I honestly don't think tumbler should try to migrate anything to
> $XDG_CACHE_HOME/.thumbnails.

Ah, I did not mean moving the thumbnails. I meant handling the confusion of several different caches... 

I guess the big problem was GLib making the change (since any apps using that mechanism won't find thumbnails made by e.g. tumbler even if they used to find them just fine) -- and that milk has now spilled. I can't think of anything tumbler could do to ease the problem anyway.

> Somehow, I had the impression that tumbler already put the thumbnails in
> .cache/thumbnails. I think it should indeed be moved there in order to 
> share the cache with everybody.

Excellent, thanks.
Comment 3 Jeremy Whiting 2014-08-07 20:15:34 CEST
Created attachment 5598 
Use $XDG_CACHE_HOME/thumbnails instead of ~/.thumbnails as per spec change

This only changes tumbler, I guess a similar patch in thunar and other places that use the thumbnails would be needed also.
Comment 4 Jannis Pohlmann editbugs 2014-08-07 20:44:13 CEST
Oh, wow, I didn't realise there was a new version of the spec out there. I was almost expecting it to remain like it is forever. ;)

The patch looks fine and since 0.8.0 of the spec has been released since 2012 it should be ok to apply this straight away. I do wonder whether we should add an optional build-time feature of creating symlinks in the old directory to smoothen the transition. Opinions?
Comment 5 Jeremy Whiting 2014-08-08 22:04:20 CEST
I don't have git access, so go ahead and push this once you feel it's ready.
Comment 6 Yves-Alexis Perez editbugs 2014-09-16 19:32:19 CEST
(In reply to Jannis Pohlmann from comment #4)
> Oh, wow, I didn't realise there was a new version of the spec out there. I
> was almost expecting it to remain like it is forever. ;)
> 
> The patch looks fine and since 0.8.0 of the spec has been released since
> 2012 it should be ok to apply this straight away. I do wonder whether we
> should add an optional build-time feature of creating symlinks in the old
> directory to smoothen the transition. Opinions?

I don't think it's really useful here. The thumbnails are, by definition, just a cache, so if they're not present they get generated. The sad part is that the disk space will still be used and not be cleaned, but there's not much to do about this.
Comment 7 Jeremy Whiting 2014-10-23 22:39:53 CEST
Hey I noticed this hasn't gotten pushed to git yet, can someone push it if it's acceptable? If it's not acceptable, let me know what needs improving and I'll make it happen.

thanks
Comment 8 Eric Koegel editbugs 2014-10-30 18:21:55 CET
(In reply to Yves-Alexis Perez from comment #6)
> (In reply to Jannis Pohlmann from comment #4)
> > Oh, wow, I didn't realise there was a new version of the spec out there. I
> > was almost expecting it to remain like it is forever. ;)
> > 
> > The patch looks fine and since 0.8.0 of the spec has been released since
> > 2012 it should be ok to apply this straight away. I do wonder whether we
> > should add an optional build-time feature of creating symlinks in the old
> > directory to smoothen the transition. Opinions?
> 
> I don't think it's really useful here. The thumbnails are, by definition,
> just a cache, so if they're not present they get generated. The sad part is
> that the disk space will still be used and not be cleaned, but there's not
> much to do about this.

I think Jannis was pointing out for the opposite now where apps like thunar don't look in the new location for the thumbnails to be present so they may keep requesting them and show the missing thumbnail image. 

Good news is this patch works with xfdesktop (as of 4.11.3) as it checks the new and old locations. As I imagine most applications outside of xfce may be doing by now?

I can help write patches for stuff that needs the update. For reference, this is the commit in xfdesktop:
http://git.xfce.org/xfce/xfdesktop/commit/?id=21e242639b81e0d7ae0a6c7e922b78149ff2deab
Comment 9 Eric Koegel editbugs 2014-10-31 19:11:31 CET
Oh and xfdesktop needs (if you're back porting to 4.10):
http://git.xfce.org/xfce/xfdesktop/commit/?id=d6dc96a944f58a93b554e7b06edf9c16617e6400
Comment 10 Eric Koegel editbugs 2015-02-19 17:10:09 CET
Both Thunar and Ristretto have been updated so it should
be safe to push this now.
Thunar
http://git.xfce.org/xfce/thunar/commit/?id=4038bde80f2311fd888f6cb807b0f7eeb574a855
Ristretto
http://git.xfce.org/apps/ristretto/commit/?id=a0e20e0dbb2e77182427ed1caa5a011d88500cfb
Comment 11 Eric Koegel editbugs 2015-02-25 10:52:30 CET
Pushed to master in:
commit 69122ab380c7f4fc5cf69d5b1d597f588ea39bc4
Author: Jeremy Whiting <jpwhiting@kde.org>
Date:   Wed Aug 6 15:26:36 2014 -0600

    Use $XDG_CACHE_HOME/thumbnails as per spec change (bug #10613)

http://git.xfce.org/xfce/tumbler/commit/?id=69122ab380c7f4fc5cf69d5b1d597f588ea39bc4

Bug #10613

Reported by:
Jussi Kukkonen
Reported on: 2014-01-08
Last modified on: 2015-02-25

People

Assignee:
Jannis Pohlmann
CC List:
5 users

Version

Version:
unspecified

Attachments

Additional information