Skip to content
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

add playback success + update css purecss + reorder columns + update crystal version #44

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Nov 4, 2023

This adds the new statistic called "playback success" (related iv-org/invidious#4085) to the column so that the user can choose instances that have working local playback (and working DASH).

I did try to add meaningful tooltips. I'm bad at CSS, so I removed the arrow that points to what the tooltip is for.

Also, I did reorder the columns and placed from the left the most important ones because I think it's more user-friendly. Not sure why we are keeping "cors" while it could just be available only in the JSON API.

Finally, I upgraded purecss from v1.0.1 to v3.0.0 and also to crystal 1.10.1


Results :
image

Tooltips:
image
image

@unixfox unixfox added the enhancement New feature or request label Nov 4, 2023
@unixfox unixfox changed the title add playback success + update css purecss + reorder columns add playback success + update css purecss + reorder columns + update crystal version Nov 4, 2023
@@ -18,7 +18,7 @@ jobs:
- name: Install Crystal
uses: oprypin/install-crystal@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: oprypin/install-crystal@v1
uses: crystal-lang/install-crystal@v1.8.1

@@ -160,6 +160,7 @@ SORT_PROCS = {
"api" => ->(name : String, instance : Instance) { instance[:api] == nil ? 2 : instance[:api] ? 0 : 1 },
"users" => ->(name : String, instance : Instance) { -(instance[:stats]?.try &.["usage"]?.try &.["users"]["total"].as_i || 0) },
"version" => ->(name : String, instance : Instance) { instance[:stats]?.try &.["software"]?.try &.["version"].as_s.try &.split("-", 2)[0].split(".").map { |a| -a.to_i } || [0, 0, 0] },
"playback" => ->(name : String, instance : Instance) { -(instance[:stats]?.try &.["playback"]?.try &.["ratio"]?.try { |ratio| ratio.as_f } || 0.0) },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about latching onto the previous (populated) playback success statistics so that we mostly won't get an empty playback stats data?

@unixfox unixfox marked this pull request as draft November 5, 2023 22:56
@unixfox
Copy link
Member Author

unixfox commented Nov 5, 2023

Waiting for a feedback for iv-org/invidious#4231 (comment)

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

Successfully merging this pull request may close these issues.

None yet

2 participants