fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

[Feature Request] Web Interface method to refresh Feed icons #1297

Open deathbybandaid opened 2 years ago

deathbybandaid commented 2 years ago

It would be really nice to have a button in the web interface to delete and replace Feed icons/logos. As of now, it seems the best method to achieve this goal is to delete and recreate feeds to get updated logos.

jtojnar commented 2 years ago

Weird, IIRC, it should refresh icon with each update. Will double check later.

jtojnar commented 2 years ago

Yeah, looking at the code, sources do not even have icons – the settings page just uses the icon from the last fetched item:

https://github.com/fossar/selfoss/blob/4fcf02fdae0c4929278633736d68a669ec912b2d/src/daos/mysql/Sources.php#L209-L223

So assuming a new items appeared in the feed, the icon will be update for the source (and for all past items, whose icon share the same URL).

Do you mean the icons on the settings page or on individual items?

Could you add log_level=debug to your config.ini and see what is logged when you refresh the source you want to update?

deathbybandaid commented 2 years ago

image

The icons for the sources is what I meant.

I make custom youtube feeds with the channel logo set as the icon. I recently updated from 2.18 to 2.19, as newer selfoss will use this icon parameter, whereas 2.18 would fetch youtube.com/favicon.ico for all the feeds.

Sadly, I already recreated all my feeds in selfoss to get the icons to refresh. If I get some time, maybe I'll create a dummy feed to test with.

jtojnar commented 2 years ago

That looks like article icons, not source icons. Article icons for existing articles will not get updated unless a newly fetched article uses the same icon URL.

The way it currently works is that each article has a hash of the icon URL stored in the database. Icons are associated with articles/items because some spouts like reddit can have a different icon for each item.

Though it might make sense to store source icon for each source in the database, since I actually recently made spouts distinguish source and item icons. Then an icon would change retrospectively for items without icon even when a source icon URL changes.