streamlink / streamlink-twitch-gui

A multi platform Twitch.tv browser for Streamlink
https://streamlink.github.io/streamlink-twitch-gui/
MIT License
2.69k stars 202 forks source link

Option to favor channels to be shown above followed live streams #477

Closed johnny1861 closed 6 years ago

johnny1861 commented 7 years ago

Hello, since I'm not a coder and new to GitHub I hope this is the right way to post a suggestion.

I'd love to have a feature that would allow to mark favorites of the followed channels which then would appear on top of the followed live channels in the "Live Streams" section.

I couldn't find any threads concerning this issue/idea. I love the project, keep up the good work.

Cheers johnny1861

bastimeyer commented 7 years ago

Hi, yes, the issue tracker is the right place when requesting features.

a feature that would allow to mark favorites of the followed channels appear on top of the followed live channels in the "Live Streams" section

This doesn't sound like a bad idea, but there are a couple of issues:

Layout-wise there are two options: separating the marked channels from the unmarked ones, or highlighting the marked ones in the normal stream listing. Separating would be problematic regarding the infinite scroll mechanism. Since not all streams are fetched at once from the API, but while scrolling in little chunks instead, marked channels would appear on top instead of below of the current viewport. I don't think this is very user friendly. Separating would also mean reimplementing the layout of the grid view, because I don't think it's a good idea to bury unmarked streams under a list of marked streams, making them disappear. Highlighting streams is much more reasonable, eg. with a slightly different background color, etc.

Logical-wise I think this feature request falls into the same category as sorting/filtering streams after requesting unfiltered/unsorted streams from the API. Since filtering and sorting is not supported by the Twitch API (for competitive broadcasting reasons), all marked channels would need to be explicitly requested first in a single or multiple API requests, depending on the number of marked channels, before the first regular "followed streams" request can be made. When fetching this regular "followed streams" data, streams which were already included in the "marked channels" requests would need to be removed from the response. This client-side filtering can lead to potential "empty" responses, requiring unnecessary additional requests, or even more in a worst case scenario. This would increase the loading time in certain situations by a lot and it would be a bad user experience.

If we had direct access to the Twitch database, those feature requests would be extremely simple, but since we're limited by the features of the public (and also private) API of Twitch, this kind of stuff can get complicated quickly. I really should add a page to the wiki and talk about the limitation of the Twitch API, because I feel like I have to explain this on every second feature request, no offense though. 😞

I'll leave this thread open for now...

johnny1861 commented 7 years ago

Hi Basti, thank you for the fast and detailed response.

I didn't expect the realization to be this difficult but regarding the explained Twitch sided restrictions of the API I totally understand the hurdles for an implementation of my idea.

Respective the display of such a feature it would mostly fit my Twitch consuming behavior with a separated section of the current preferred channels for I have intervals with a handful of varying streamers which I watch on a regular basis; although following about a hundred in general. The highlighting of marked channels is an interesting approach to compromise this subject.

I wonder though how many channels the average Twitch viewer is following; as I mentioned, I follow about a hundred channels and it takes me less than three seconds to scroll from top to bottom including the loading time for the first chunk. Would it be a problem, in times of high speed internet and powerful computing, to receive all followed channels at once (by automated scrolling), followed by the filter ?

Again, thanks for your effort to provide such a tool in the first place. My greatest respect.

bastimeyer commented 7 years ago

receive all followed channels at once

There's a maximum amount of records that can be requested in a single query, 100 to be precise. But since users are able to follow as many channels as they want, assuming that a single request would be enough is just bad. For the vast majority of users, requesting a list of 100 followed streams would be enough, but that's just because we're talking about followed streams here. The next thing that would be asked for would be marking unfollowed channels or games, communities, etc, or filtering in general (https://github.com/streamlink/streamlink-twitch-gui/issues/421#issuecomment-286580754). But as I've said, implementing this stuff without the API supporting it, is difficult and in most cases bad practice, since you're working around it.