rtv
rtv copied to clipboard
[Feature Suggestion] Add colored sidebars to posts according to link type
Hey Michael,
What do you think about adding thin colored vertical bars to posts like they are in the comments; the color could correspond with what sort of media is linked by the post.
For example - a thin red bar for site links, a thin blue bar for pictures, a thin aqua bar for gif, a thin green bar for video, a thin white bar for text...?
Hey, I think that's an intriguing idea! One of the big hurdles that I can think of is that with a lot of popular sites (imgur, twitter, instagram, etc) it's difficult to figure out what kind of content the link contains. Currently rtv will make an attempt to figure out the media type when the user opens the link (see mime_parsers.py). However, this often requires making additional HTTP requests that are site-specific and it would be way too much overhead if we did it for every single link displayed in the feed.
The Reddit API returns some metadata like oembed that might be useful for determining link type, but I haven't really looked into it yet and it seems to not have great documentation.