FreshRSS / Extensions

A repository containing all the official FreshRSS extensions
GNU Affero General Public License v3.0
350 stars 53 forks source link

Extensions work for specific subscription? #242

Open Nikkiiw opened 3 months ago

Nikkiiw commented 3 months ago

Hi! Firstly thx for all the work. Can extensions work for specific subscription? Like ImageProxy, some pic of subscription do not need proxy , but some other do. Thank you for reply.

math-GH commented 3 months ago

Can extensions work for specific subscription?

yes. It depends on the extension.

Like ImageProxy, some pic of subscription do not need proxy , but some other do.

It depends on the used proxy. See: https://github.com/FreshRSS/Extensions/tree/master/xExtension-ImageProxy If WSRV.NL is used I cannot find a fitting configuration

Nikkiiw commented 3 months ago

@math-GH Thx! But ImageProxy is just a exemple. Does FreshRSS has a switch or something can let user choose which extension work for a specific subscription? Like subscription A use ImageProxy, subscription B use FeedTitleBuilder

Or some config file?

Alkarex commented 3 months ago

Does FreshRSS has a switch or something can let user choose which extension work for a specific subscription?

There is no such function at the moment, but extensions can decide which feed to apply to and could expose some settings for that

Nikkiiw commented 3 months ago

@Alkarex thx! I will do some research

Nikkiiw commented 3 months ago

@Alkarex I'm really sorry I do some research but can not find out how to do it. Can you show some example? appreciate that!

Nikkiiw commented 3 months ago

scheme_default (default: auto): which scheme to use for resources that do not include one; if set to -, those will not be proxied; if set along scheme_include, the scheme included in the URL will either be auto-matically derived from your current connection or the one explicitly specified

This is from Image Proxy.Use this function to decide? Am I correct?

Alkarex commented 3 months ago

You would have to patch the extension for your needs.

In the following code, $entry has access to the feed information: https://github.com/FreshRSS/Extensions/blob/64b5ac4abeec90edf9f8c855d0aa0238907eba1e/xExtension-ImageProxy/extension.php#L147-L152

Nikkiiw commented 3 months ago

@Alkarex Nice!really thx!