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

Made Reddit Score field in LSF tooltip use humanized value #164

Merged
merged 2 commits into from
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Made Reddit Score field in Livestreamfails tooltip use humanized value. (#164)
- Added support for customizable oEmbed resolving for websites with the `providers.json` file. See [`data/oembed/providers.json`](data/oembed/providers.json). Three new environment variables can be set. See [`internal/resolvers/oembed/README.md`](internal/resolvers/oembed/README.md) (#139, #152)
- Breaking: Environment variable `CHATTERINO_API_CACHE_TWITCH_CLIENT_ID` was renamed to `CHATTERINO_API_TWITCH_CLIENT_ID`. (#144)
- Dev, Breaking: Replaced `dankeroni/gotwitch` with `nicklaw5/helix`. This change requires you to add new environment variable: `CHATTERINO_API_TWITCH_CLIENT_SECRET` - it's a client secret generated for your Twitch application.
Expand Down
2 changes: 1 addition & 1 deletion internal/resolvers/livestreamfails/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func load(clipID string, r *http.Request) (interface{}, time.Duration, error) {
NSFW: clipData.IsNSFW,
Title: clipData.Label,
Category: clipData.Category.Label,
RedditScore: clipData.RedditScore,
RedditScore: humanize.Number(uint64(clipData.RedditScore)),
Platform: strings.Title(strings.ToLower(clipData.SourcePlatform)),
StreamerName: clipData.Streamer.Label,
CreationDate: humanize.CreationDate(clipData.CreatedAt),
Expand Down
2 changes: 1 addition & 1 deletion internal/resolvers/livestreamfails/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type TooltipData struct {
NSFW bool
Title string
Category string
RedditScore int
RedditScore string
Platform string
StreamerName string
CreationDate string
Expand Down