Fix sorting bug in twitch channels widget
This commit is contained in:
parent
83f0d16904
commit
6fb6467b07
1 changed files with 4 additions and 0 deletions
|
|
@ -196,6 +196,10 @@ func fetchChannelFromTwitchTask(channel string) (twitchChannel, error) {
|
|||
slog.Warn("Failed to parse Twitch stream started at", "error", err, "started_at", streamMetadata.UserOrNull.Stream.StartedAt)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// This prevents live channels with 0 viewers from being
|
||||
// incorrectly sorted lower than offline channels
|
||||
result.ViewersCount = -1
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue