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
(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.
(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.
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.
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 have git access, so go ahead and push this once you feel it's ready.
(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.
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
(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
Oh and xfdesktop needs (if you're back porting to 4.10): http://git.xfce.org/xfce/xfdesktop/commit/?id=d6dc96a944f58a93b554e7b06edf9c16617e6400
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
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