-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
name: instances | ||
version: 0.1.0 | ||
version: 0.2.0 | ||
|
||
authors: | ||
- Omar Roth <[email protected]> | ||
- Invidious team | ||
|
||
targets: | ||
instances: | ||
|
@@ -11,8 +12,8 @@ targets: | |
dependencies: | ||
kemal: | ||
github: kemalcr/kemal | ||
branch: master | ||
version: ~> 1.4.0 | ||
|
||
crystal: 1.0.0 | ||
crystal: 1.10.1 | ||
|
||
license: AGPLv3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
} | ||
|
||
def sort_instances(instances, sort_by) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.