Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

radio/v1 package

Overview

Package radio is GnoRadio's radio rules, release 1: a main station that plays the whole catalog through the genre stations, one station per genre, "New this week" (the newest tracks) and "Listeners' choice" (the tracks listeners picked). Everyone tuned to a station hears the same track at the same second, computed from block time; no streaming server is involved. Between picks the main station simulcasts one genre station an hour, by the time of day (flow.gno); it has no rotation of its own.

Each station has a rotation (every playable track of its genre, looping) stored in fixed-size blocks so that every operation costs the same whatever the catalog size, and a short schedule of tracks programmed by listeners. While a programmed track plays the rotation pauses, then resumes where it was. Adding, removing or editing a track never makes listeners jump.

It keeps no state but its admin role. Every record lives in the data realm (gno.land/r/nym-alexiscolin000/gnoradio/data), in the "radio/…" collections only the current radio writer may change (db.gno). It reads the catalog through its value getters; sponsored picks are paid from data's vault through the catalog.

Function

NowPlaying

func NowPlaying(stationID int) (trackID int, offset int64, queued bool)

NowPlaying returns what a station plays at the last block: the track, the offset into it in seconds, and whether a listener programmed it. trackID is 0 when nothing plays. Clients should prefer ScheduleJSON and their clock.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-alexiscolin000/gnoradio/radio/v1.NowPlaying()"

Result