Skip to content

Filter Issue and Suggestion #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CodyGeek2000 opened this issue Oct 16, 2024 · 1 comment
Open

Filter Issue and Suggestion #176

CodyGeek2000 opened this issue Oct 16, 2024 · 1 comment

Comments

@CodyGeek2000
Copy link

Hi all,
All the status filters work except the downloading filter wich returns 0 results even though there are users downloading. Also the next one is not an issue but a request/suggestion to add "Active" to the filter to show only the users that are running regardless their online/downloading/not downloading status like "Inactive" does with those that are not running. I played a little bit with streamonitor.js but couldn't get it to work.

@SolarNightx
Copy link

I had the same issue so I ended up fixing it my self and adding a new "rate limited" option for filtering. The problem is the website checks for a variable called gStat which doesn't exist in whats being sent from /api/data so by removing that check the classes can be assigned and then the filtering which uses the classes also works.

In streamonitor.js change:

	streamerNode.classList.toggle("inactive", !streamer.running);
	streamerNode.classList.toggle(
		"downloading",
		streamer.sc == 200 && streamer.gStat == 1
	);
	streamerNode.classList.toggle(
		"notDownloading",
		streamer.sc != 200 || streamer.gStat == 0
	);
	streamerNode.classList.toggle(
		"onlineButNotDownlading",
		streamer.sc == 200 && streamer.gStat == 0
	);
	streamerNode.classList.toggle("private", streamer.sc == 403);

To:

          streamerNode.classList.toggle("inactive", !streamer.running);
          streamerNode.classList.toggle("downloading", streamer.sc === 200);
          streamerNode.classList.toggle("notDownloading", streamer.sc !== 200);
          streamerNode.classList.toggle("onlineButNotDownloading", streamer.sc === 200 && !streamer.running);
          streamerNode.classList.toggle("private", streamer.sc === 403);
          streamerNode.classList.toggle("rateLimited", streamer.sc === 429); // Add this line

And in index.html for the new rate limited option:

                <option value="" selected></option>
                <option value="downloading">Downloading</option>
                <option value="notDownloading">Not downloading</option>
                <option value="onlineButNotDownloading">Online but not downloading</option>
                <option value="private">Private</option>
                <option value="rateLimited">Rate limited</option>        <!-- Added -->
                <option value="inactive">Inactive</option>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants