mwalbeck / twitchlite

A lightweight livestream indexer for twitch
MIT License
3 stars 0 forks source link

Add Sorting #4

Closed dinosaw closed 5 years ago

dinosaw commented 5 years ago

I feel like I'm the only one who opens cases on this hah, so my apologies.

I'd like to request if there would be any chance to add a sorting option as well? For example, instead of automatically showing by who has the most viewers, maybe allow a reverse of that like who has the lowest viewers? Or maybe sort by followers? Or maybe that there's the new "tags" feature (e.g. Shooter, MOBA, IRL, FPS, etc) that you could sort by.

If not no worries, just thought I'd ask!

mwalbeck commented 5 years ago

I'm just glad somebody enjoys my creation.

I've had a look at the twitch api docs and it should be possible to sort by viewers or followers using the old v5 api, which is the api this project is currently using. So I might take a look at it at some point.

Regarding any other sorting methods like the tags feature, that doesn't seem possible, even with the new api. In general it seems like the new api is only better than the old if you're working with the some of the latest twitch features, but is inferior if you aren't. Luckily they haven't announced a removal date for the v5 api, so we should be able to use it for the foreseeable future.

dinosaw commented 5 years ago

As far as enjoying your creation, I love it hah. I've actually been using it personally instead of the Twitch website just because of how bloated Twitch has become. This basically has exactly what I want when trying to find streams.

And thanks for looking into the request. It's not essential, I was actually more interested in the tag feature. So that's a bummer about the new API. But if you don't mind implementing the sorting by viewers/followers, that would be awesome too! Whatever you have time for.

mwalbeck commented 5 years ago

Regarding this sorting, the api is very limited when it comes to this and you can only get a list is descending order of views. I would technically be possible but it's going to a bit messy and complicate thing a bit more than I like.

I'll reconsider it when the "new" api has the missing features needed for this project to actually work with it. Which if you're curious is getting followed streams, I can't see a way of doing that with the new api. Also they still haven't announced when the v5 api (the one I'm using) is going to be deprecated.

dinosaw commented 5 years ago

No worries, I appreciate the update. You can close this out if you'd like. I believe just having the ability to search which is being addressed in the other issue I opened will suffice. Thanks!