Cache images from starred articles

Request new functionality here
kautsu
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 02 Aug 2013, 02:40

Cache images from starred articles

Postby kautsu » 02 Aug 2013, 02:46

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 02 Aug 2013, 09:17

I thought about it before and it makes sense, but there are some implementation difficulties. This might happen but I won't promise anything.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 02 Aug 2013, 14:18

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.

kautsu
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 02 Aug 2013, 02:40

Re: Cache images from starred articles

Postby kautsu » 03 Aug 2013, 18:43

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?

nippon
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 26 Jun 2013, 05:42

Re: Cache images from starred articles

Postby nippon » 04 Sep 2013, 13:12

Any news on this?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 04 Sep 2013, 13:26

Uh it's done in trunk.

levito
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 17 Mar 2013, 04:18

Re: Cache images from starred articles

Postby levito » 06 Sep 2013, 06:14

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!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 06 Sep 2013, 09:06

>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

levito
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 17 Mar 2013, 04:18

Re: Cache images from starred articles

Postby levito » 07 Sep 2013, 01:45

Thanks a lot, it works! Eh Fox, do you ever sleep? ;)

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Cache images from starred articles

Postby sleeper_service » 07 Sep 2013, 02:05

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 07 Sep 2013, 12:01

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.

levito
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 17 Mar 2013, 04:18

Re: Cache images from starred articles

Postby levito » 07 Sep 2013, 16:10

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...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 07 Sep 2013, 16:42

works fine here

Sent from my GT-I9300 using Tapatalk 4

feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Re: Cache images from starred articles

Postby feader » 07 Sep 2013, 16:43

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 07 Sep 2013, 17:19

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.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 4 guests