Page 1 of 1

Support width/height for media:thumbnail

Posted: 10 Jul 2014, 20:40
by dxbi
I noticed some feeds, specifically Atom-Feeds generated by Gitlab, contain very large avatar images. I thought the feed was just broken, but on further investigation it seems they use

Code: Select all

<media:thumbnail width="40" height="40" url="https://gitlab-host/uploads/user/avatar/N/Avatar.jpg"/>


From the media-rss spec, it seems width and height are valid here. Is there a more elegant way to implementing this in ttrss other than extending the schema, adding fields to FeedEnclosure and all the respective arrays? I started adding support for it but ended up having to touch code in many places. Don't think I've perfectly understood the way enclosures are handled though :)

Re: Support width/height for media:thumbnail

Posted: 10 Jul 2014, 20:49
by fox
hmmm what if instead they stop linking humongous images while limiting their size with attributes like colossal fucking retards

im like just saying and all

Sent from my C6603 using Tapatalk

Re: Support width/height for media:thumbnail

Posted: 10 Jul 2014, 22:58
by dxbi
True. Still... probably less frustrating to implement the attributes in ttrss instead of creating a huge patch for gitlab implementing image resizing and caching.

Re: Support width/height for media:thumbnail

Posted: 10 Jul 2014, 23:23
by fox
obviously, them fixing their retarded shit is out of the question, i better start working to accommodate it instead

wake me up when you cook up a pull request is what i'm saying

e: tbh it should be easy enough, write 2 upgrade scripts, extend schema, etc, should take an hour tops