redlib icon indicating copy to clipboard operation
redlib copied to clipboard

💡 Feature request: RSS filter like on Reddit

Open foregroundprocess opened this issue 10 months ago • 2 comments

RSS feed contains all of the posts in a subreddit, even if I select TOP, or make a search.

On Reddit you do the search, apply the filters, like TOP of the week. And each result has its own URL, like https://www.reddit.com/r/unpopularopinion/top/?t=week Same on Redlib.

But Reddit also creates an RSS feed for such URL, like https://www.reddit.com/r/unpopularopinion/top.rss?t=week

Can Relib behave in the same way? Currently RSS URL remains the same for a subreddit even if I set a filter.

foregroundprocess avatar Jan 27 '25 17:01 foregroundprocess

For anyone looking to work on this: seems like the sort parameter isn't being parsed correctly around here: https://github.com/redlib-org/redlib/blob/bbe5f8191475ea20e41e5a4eb1572fbd2a45d8b3/src/subreddit.rs#L588

Leading to the default case 'hot' being chosen at all times.

sigaloid avatar Feb 03 '25 04:02 sigaloid

Here is a patch so you can set sort=new for RSS. The problem was that type "req" does not contain "param", so these need to be got from the URI. I did this with a HashMap. Don't slate my code! It was the first time I wrote anything in rust! ;)

Apply with

patch -p0 < subreddit-rss.patch

Many thanks

subreddit-rss.patch

publicsite avatar Sep 10 '25 03:09 publicsite