@page "/rvrb" rvrb bot

rvrb bot

@StatusLabel

@if (Snapshot is null) {

Nothing answered on the bot's node, so there are no stats to show.

@if (Status.Error is { } error) { @* A failure on the far side arrives as an Erlang term, stack trace and all, which is worth keeping but not worth putting in front of everyone. *@
What went wrong
@error
}
} else { @if (Snapshot.Live is null) {

The bot isn't connected to RVRB right now, so nothing is playing.

} else if (Snapshot.Live.CurrentTrack is not { } track) {

Connected, but no track has played since the bot joined.

} else {
@if (track.AlbumArt is { } art) { }

@* A bar needs both halves to mean anything: a track that came without a duration, or one already playing when the bot connected, gets neither. *@ @if (track.Duration is { } length && track.Elapsed is not null) {

@Format.Duration(track.Elapsed) / @Format.Duration(length)

}

👍 @Snapshot.Live.Dopes 🔖 @Snapshot.Live.Stars @if (Snapshot.Live.AutoDoped) { — the bot doped this one } @if (Snapshot.Live.AutoStarred) { — and starred it }

}
@if (Snapshot.Live is { Djs.Count: > 0 } live) {
@foreach (var dj in live.Djs) { }
DJ Avg track length Next play in
@(dj.Current ? "▶ " : "")@(dj.Name ?? "someone") ≈ @Format.Duration(dj.AverageTrack) @if (!dj.Measured) { (assumed) } ≈ @Format.Duration(dj.Wait)
@if (live.QueuedTracks > 0) {

@live.QueuedTracks @(live.QueuedTracks == 1 ? "track" : "tracks") queued for the bot's own turn.

}
}
Plays
@Snapshot.Totals.Plays
Tracks
@Snapshot.Totals.Tracks
Artists
@Snapshot.Totals.Artists
DJs
@Snapshot.Totals.Djs
Users seen
@Snapshot.Totals.Users
Dopes
@Snapshot.Totals.Dopes
Stars
@Snapshot.Totals.Stars
@if (Snapshot.Totals.FirstPlayAt is { } first) {

Recording plays since .

}
    @foreach (var day in Snapshot.PlaysPerDay) {
  1. @day.Plays @DayLabel(day)@DayInitial(day)
  2. }
@foreach (var dj in Snapshot.TopDjs) { }
DJ Plays 👍 🔖 Score
@dj.Name @dj.Plays @dj.Dopes @dj.Stars @dj.Score
@foreach (var track in Snapshot.TopTracks) { }
Track Artist Plays Score
@track.Plays @track.Score
@foreach (var artist in Snapshot.TopArtists) { }
Artist Plays Score
@artist.Plays @artist.Score
@foreach (var play in Snapshot.RecentPlays) { }
When DJ Track Artist Score
@play.Dj @play.Score

Read from @Options.Node over Erlang distribution with BeamSharp. Snapshot taken .

}