benzap / redditv

Subreddit Video Player
http://redditv.ca
Eclipse Public License 1.0
17 stars 1 forks source link

Increase the 96 max limit of videos #5

Closed raonyguimaraes closed 6 years ago

raonyguimaraes commented 6 years ago

Hi there,

Thanks for the awesome website and clean UI! I'm so glad I finally found a good alternative to radd.it.

Can you please increase the max limit of videos from 96 to something more reasonable, for example, 500-1000? I got 96 videos done in just a few hours.

Kind Regards.

benzap commented 6 years ago

It's definitely possible, this is something i'll look into. Thanks for the feedback :)

raonyguimaraes commented 6 years ago

No problem, thanks for the amazing website! The best replacement I found after radd.it closed.

Do you want me to make a pull request, whats the problem with increasing the limit? Shouldn't this keep more people on the website?

benzap commented 6 years ago

The issue is that a jsonp request to grab posts from a subreddit is limited to a count of 100. The code I wrote for it needs refactoring. 😞

The way to fix it would be to make several asynchronous jsonp requests and accumulate the posts to the desired limit. The code in question is here: https://github.com/benzap/redditv/blob/master/src/cljs/redditv/reddit.cljs#L43

I have some time, so I'll look over it today, and see if I can set the default to something higher and refactor it to make it easier to add additional enhancements.

benzap commented 6 years ago

Alright, I was able to refactor a bit! I raised the max limit to 1k posts, and set the default to 200 video posts:

http://redditv.ca/#/r/videos/0?count=1000

Note that it takes much longer to grab all of the videos. I think I might work on adding better animations and progress indicators for initial startup and loading of the videos.

Thanks again for the feedback, and enjoy :)

raonyguimaraes commented 6 years ago

Very cool!

There goes more of my free time ... :D

Thank you.