Page 1 of 2

Cache images from starred articles

Posted: 02 Aug 2013, 02:46
by kautsu
Hi,

Is it possible to make tt-rss cache images locally from starred articles only? I would hate to see that images from my starred articles taken down.

Re: Cache images from starred articles

Posted: 02 Aug 2013, 09:17
by fox
I thought about it before and it makes sense, but there are some implementation difficulties. This might happen but I won't promise anything.

Re: Cache images from starred articles

Posted: 02 Aug 2013, 14:18
by fox
This was somewhat easier than I expected, so there's a plugin for that in trunk now. It seems to work fine. It won't work on 1.9 because I had to add some plugin-related stuff to make it possible.

Re: Cache images from starred articles

Posted: 03 Aug 2013, 18:43
by kautsu
Thank you very much, you are awesome! :wink:

I updated my tt-rss to 1.9 yesterday... :?

Will the plugin related stuff make it to the next update?

Re: Cache images from starred articles

Posted: 04 Sep 2013, 13:12
by nippon
Any news on this?

Re: Cache images from starred articles

Posted: 04 Sep 2013, 13:26
by fox
Uh it's done in trunk.

Re: Cache images from starred articles

Posted: 06 Sep 2013, 06:14
by levito
Hi Fox, I found one little problem: The plugin tries to chmod 777 the cache directory. This is not always allowed. So i thought: No problem, I can set it to 777 by myself. Images are cached now. It works almost fine after that. Almost.

The problem: The plugin always tries to chmod 777, and it fails. The system log tab gets filled with error messages, one entry per minute. So I had to comment-out the chmod line in the plugin.

Is there a way to test if the cache dir is already set to 777 before trying to chmod? Maybe the error log message could also say clearly how to fix it by hand.

Cheers!

Re: Cache images from starred articles

Posted: 06 Sep 2013, 09:06
by fox
>Is there a way to test if the cache dir is already set to 777 before trying to chmod?

It can test for is_writable() or something, I can add this later. Or send me a pull request.

e: done

Re: Cache images from starred articles

Posted: 07 Sep 2013, 01:45
by levito
Thanks a lot, it works! Eh Fox, do you ever sleep? ;)

Re: Cache images from starred articles

Posted: 07 Sep 2013, 02:05
by sleeper_service
levito wrote:Thanks a lot, it works! Eh Fox, do you ever sleep? ;)
fox never sleeps, he does get put into a 'maintenance' mode occasionally when he's unresponsive, and there was that whole "vacation' thing last month when they actually did a capacity upgrade on him.

Re: Cache images from starred articles

Posted: 07 Sep 2013, 12:01
by fox
levito wrote:Thanks a lot, it works! Eh Fox, do you ever sleep? ;)


That was 9AM. :)

And yeah the whole being a robot thing also.

Re: Cache images from starred articles

Posted: 07 Sep 2013, 16:10
by levito
I found another issue: If you have ENABLE_GZIP_OUTPUT set to true in the config, it will be also applied to the images.

This breaks the images. Both Firefox and Chrome can't display them.

Not a big deal, I have simply set it to false. But maybe there's a fix...

Re: Cache images from starred articles

Posted: 07 Sep 2013, 16:42
by fox
works fine here

Sent from my GT-I9300 using Tapatalk 4

Re: Cache images from starred articles

Posted: 07 Sep 2013, 16:43
by feader
levito wrote:I found another issue: If you have ENABLE_GZIP_OUTPUT set to true in the config, it will be also applied to the images.

This breaks the images. Both Firefox and Chrome can't display them.

Works fine here too, with Firefox at least.

Re: Cache images from starred articles

Posted: 07 Sep 2013, 17:19
by fox
By the way, image.php doesn't set ob_gzhandler so it's not like this option should have any effect on it. Unless I'm missing something.