💡 Feature request: RSS filter like on Reddit
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.
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.
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