activitySize
untyped bigintValue
(64 <untyped> bigint)
Activity
typeActivity is one programming action on a station.
Value
v1.Activity
recordActivity
func(t *v1.tx, kind string, by .uverse.address, track int, station int, start int64)recordActivity writes the next slot of the fixed-size ring (storage never grows): Rec(kind, by, numbers), the numbers the track (4 digits), the station (1), the start (6) and the time (6). The head is in the flow record.
- OID
- 0850bb…5bce:3
recordActivity details
activityOf
func(rec string) v1.Activity- OID
- 0850bb…5bce:5
activityOf details
activities
func(limit int) []stringactivities returns up to limit records, newest first: the ring's slots before its head, read one by one (the ring fills from slot 0 and no slot is ever deleted, so the first empty one ends it).
- OID
- 0850bb…5bce:6
activities details
Activities
func(limit int) []v1.ActivityActivities returns up to limit entries, newest first.
- OID
- 0850bb…5bce:7
Activities details
ActivityJSON
func(limit int) stringActivityJSON returns the programming feed, newest first (limit \<= 64).
- OID
- 0850bb…5bce:8
ActivityJSON details
adminAddr
func() .uverse.address- OID
- 0850bb…5bce:9
adminAddr details
syncAdmin
func()syncAdmin adopts the mirror when the previous release changed it after this one's init (during the release's delay).
- OID
- 0850bb…5bce:11
syncAdmin details
onlyAdmin
func()- OID
- 0850bb…5bce:12
onlyAdmin details
Admin
func() .uverse.address- OID
- 0850bb…5bce:13
Admin details
PendingAdmin
func() .uverse.address- OID
- 0850bb…5bce:14
PendingAdmin details
Ready
func()Ready tells the data realm that this release is on chain (see data.Propose). Anyone may call it.
- OID
- 0850bb…5bce:15
Ready details
OfferAdmin
func(to .uverse.address)OfferAdmin offers the admin role to an address (offering it to the admin cancels the offer); AcceptAdmin takes it. Each change is mirrored to the data realm, so the next release keeps the admin.
- OID
- 0850bb…5bce:16
OfferAdmin details
AcceptAdmin
func()- OID
- 0850bb…5bce:17
AcceptAdmin details
RenounceAdmin
func()RenounceAdmin gives the admin role up for good, for this release and the next ones.
- OID
- 0850bb…5bce:18
RenounceAdmin details
DropSlot
func(stationID int, trackID int)DropSlot silences a track in one station's rotation (moderation of last resort). It stays silent through Refresh until RestoreSlot. Radio admin only.
- OID
- 0850bb…5bce:19
DropSlot details
RestoreSlot
func(stationID int, trackID int)RestoreSlot undoes DropSlot: the track plays again on that station if the catalog still allows it. Radio admin only.
- OID
- 0850bb…5bce:20
RestoreSlot details
Unqueue
func(stationID int, trackID int)Unqueue removes a track's programmed slots from a station; one on air ends now. Radio admin (curator) only.
- OID
- 0850bb…5bce:21
Unqueue details
Render
func(string) stringRender points gnoweb visitors to the GnoRadio site; a retired release says which realm took over.
- OID
- 0850bb…5bce:22
Render details
allStations
untyped bigintValue
(-1 <untyped> bigint)
topCurators
untyped bigintValue
(10 <untyped> bigint)
topMax
untyped bigint// the longest station top: week, count, then score and key per curator
Value
(465 <untyped> bigint)
week
untyped bigintValue
(604800 <untyped> bigint)
tipGrace
untyped bigint// seconds after a pick ends during which a tip still credits its picker
Value
(120 <untyped> bigint)
Curator
typeCurator is a picker's record, all time or for one week.
Value
v1.Curator
cWeek
untyped bigintA curator is one record: all time, picks, tips, earned, promo, first pick, period, picks this period, picks the period before (sponsor.gno); this week across stations, week, picks, tips, earned; each a fixed-width number (cWidths). Then one entry per station picked on lately: the station (1 digit), week, picks, tips, earned and the last pick time (sWidths).
Value
(8 <untyped> bigint)
cFields
untyped bigintA curator is one record: all time, picks, tips, earned, promo, first pick, period, picks this period, picks the period before (sponsor.gno); this week across stations, week, picks, tips, earned; each a fixed-width number (cWidths). Then one entry per station picked on lately: the station (1 digit), week, picks, tips, earned and the last pick time (sWidths).
Value
(12 <untyped> bigint)
cLen
untyped bigint// the numbers
Value
(62 <untyped> bigint)
sLen
untyped bigint// one station entry
Value
(27 <untyped> bigint)
cWidths
[12]int- OID
- 0850bb…5bce:24
cWidths details
sWidths
[5]int- OID
- 0850bb…5bce:26
sWidths details
TipOnAir
func(stationID int, trackID int, supportPct int, ref .uverse.address)TipOnAir tips the artist of trackID: the attached ugnot go through the catalog, which pays the artist and collaborators exactly as catalog.TipWithSupport does. When trackID is a listener's pick on air on stationID (or ended less than two minutes ago), the artist's promo share goes to that listener; the radio reads the picker from its own schedule. ref is who shared the link the tipper came from ("" for none): picker and ref split the promo share, never more.
- OID
- 0850bb…5bce:27
TipOnAir details
credit
func(t *v1.tx, by .uverse.address, stationID int, picks int, tips int, earned int64)credit adds picks or a shared tip to a curator, all time and this week. The station's entry also keeps the time of the last pick there, which the queue cooldown reads (lastPickAt): no extra write per pick.
- OID
- 0850bb…5bce:29
credit details
curRec
func(t *v1.tx, k string) ([]int64, string)curRec reads a curator record (zeros when absent) and its station entries.
- OID
- 0850bb…5bce:30
curRec details
putCur
func(t *v1.tx, k string, c []int64, sts string)- OID
- 0850bb…5bce:31
putCur details
stationOf
func(sts string, stationID int) []int64stationOf returns a curator's entry for a station: week, picks, tips, earned, last pick time (zeros when none).
- OID
- 0850bb…5bce:32
stationOf details
withStation
func(sts string, stationID int, w []int64, ts int64) stringwithStation sets a station's entry and drops the entries that no longer count: an older week whose last pick is past the cooldown.
- OID
- 0850bb…5bce:33
withStation details
markPick
func(t *v1.tx, by .uverse.address, stationID int)markPick keeps the time of a pick that earns no point (a sponsored one) for the queue cooldown.
- OID
- 0850bb…5bce:34
markPick details
lastPickAt
func(t *v1.tx, addr .uverse.address, stationID int) int64lastPickAt is when addr last picked on a station (0: never).
- OID
- 0850bb…5bce:35
lastPickAt details
weekOf
func(ts int64) int64weekOf numbers weeks from Monday 00:00 UTC.
- OID
- 0850bb…5bce:36
weekOf details
rank
typeValue
v1.rank
topRec
func(t *v1.tx, i int) stringtopRec is ranking i: 0 across stations, else station i-1's (in its record, which a pick there writes anyway).
- OID
- 0850bb…5bce:37
topRec details
top
func(t *v1.tx, i int, wk int64) []v1.ranktop reads ranking i of week wk (nil when another week's).
- OID
- 0850bb…5bce:38
top details
setTop
func(t *v1.tx, i int, wk int64, k string, v int64)setTop raises k's score in a ranking, emptied when a new week starts. Scores only grow, so a score below the last of a full top leaves it untouched (and unsaved): k cannot be in it. That is read without decoding the list.
- OID
- 0850bb…5bce:39
setTop details
CuratorOf
func(addr .uverse.address) v1.CuratorCuratorOf returns a listener's curator record, all time.
- OID
- 0850bb…5bce:40
CuratorOf details
TopCurators
func(stationID int) []v1.CuratorTopCurators returns this week's top curators of a station (allStations: every station), best first, with their counts for the week. Picks and tips received on air score one point each.
- OID
- 0850bb…5bce:41
TopCurators details
weekTop
func(t *v1.tx, stationID int) []v1.Curator- OID
- 0850bb…5bce:42
weekTop details
CuratorJSON
func(addr .uverse.address) stringCuratorJSON returns a listener's curator record: all time, this week, and their place in this week's top across stations (0 when outside the top 10).
- OID
- 0850bb…5bce:43
CuratorJSON details
TopCuratorsJSON
func(stationID int) stringTopCuratorsJSON returns TopCurators as JSON with the week's start (unix).
- OID
- 0850bb…5bce:44
TopCuratorsJSON details
cStations
untyped string// P(station) -> Rec(epoch, ring, live, rotation header, schedule, recent picks, weekly top\[, ring rotation, ring index])
Value
"radio/stations"
cRot
untyped string// P(station)/b/P(block) -> block; P(station)/g/P(group) -> block sums (p/blocks)
Value
"radio/rot"
cHomes
untyped string// P((id-1)/homesChunk) -> Rec of homes entries (the genre stations of a track), one per synced track
Value
"radio/homes"
cMeta
untyped string// "flow" -> flow record
Value
"radio/meta"
cCurators
untyped string// address -> curator record (curators.gno)
Value
"radio/curators"
cTops
untyped string// "all" -> this week's top curators across stations (a station's is in its record)
Value
"radio/tops"
cDropped
untyped string// P(station)/P(track) -> "1"
Value
"radio/dropped"
cNotes
untyped string// P(station)/T(start) -> reporters, or the strike a hide gave (notes.gno)
Value
"radio/notes"
cMuted
untyped string// address -> unix time its dedications are refused until
Value
"radio/muted"
cStrikes
untyped string// address -> unix time one of its dedications was last hidden
Value
"radio/strikes"
cSponsor
untyped string// address/P(station) -> open sponsored pick (sponsor.gno)
Value
"radio/sponsor"
cActivity
untyped string// P(0..63) -> activity record (a ring, its head in the flow record)
Value
"radio/activity"
cConfig
untyped string// "admin" (mirror of the admin role), "modbot" (hex key)
Value
"radio/config"
collections
[]string- OID
- 0850bb…5bce:46
collections details
homesChunk
untyped bigint// homes entries per key
Value
(16 <untyped> bigint)
maxRecord
untyped bigint// the data realm's longest value
Value
(16384 <untyped> bigint)
setup
func(holder .uverse.address)setup makes the radio's collections and its first records, once: a later release finds them made (it is not the writer in its init).
- OID
- 0850bb…5bce:47
setup details
dec
[128]int64Fixed-width base-64 numbers are store.Num, store.Fixed and store.AppendFixed. dec is store.Digits' decoding table, for the digits the hot loops read in place: a call per digit costs about 1% of a pick.
- OID
- 0850bb…5bce:50
dec details
decTable
func() d [128]int64- OID
- 0850bb…5bce:51
decTable details
tx
typetx reads each key from the data realm once and writes every key it changed once, in one call (data.Set or data.Batch); the stations it loaded are decoded once and encoded back when changed. Every entrypoint loads what it needs, changes it in its tx, then saves; readers use one too. A tx is never stored.
Value
v1.tx
entry
typeValue
v1.entry
rd
func() *v1.tx- OID
- 0850bb…5bce:52
rd details
save
func(t *v1.tx)save writes what t changed: one data.Set or data.Remove, or Batches of 64 ops (a Sync or a RefreshArtist may change more keys than one Batch takes; the transaction keeps them atomic).
- OID
- 0850bb…5bce:53
save details
fSynced
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(0 <untyped> bigint)
fDrops
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(4 <untyped> bigint)
fHead
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(8 <untyped> bigint)
fTopWeek
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(9 <untyped> bigint)
fTopLast
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(13 <untyped> bigint)
fLive
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(17 <untyped> bigint)
flowLen
untyped bigintThe flow record is fixed-width: synced (4 digits), the number of dropped slots (4), the activity ring's next slot (1), the week of the top across stations and its last score when it holds topCurators (0 else) (4 and 4: a pick that scores less leaves it as it is, unread), then "1" for each genre station with a live track ("0" else, index = genre): Main relays one of those (hourGenre). Every call reads it.
Value
(38 <untyped> bigint)
dropKey
func(stationID int, trackID int) string- OID
- 0850bb…5bce:54
dropKey details
station
typestation is a station loaded in a tx: its header and schedule are one record (cStations); its rotation is read and written a block at a time (cRot), but for New and Choice: their rings (at most 500 slots) and the index of the tracks in them are part of their record, which a pick changes anyway. The schedule is decoded on first use (slots): a call that only needs the time paused under it (paused) or a picker (picker) reads it as it is.
Value
v1.station
blockLen
untyped bigintA ring's rotation (one group) is its group's sums, 4 digits per block, then its blocks, blocks.Size slots each but the last.
Value
(768 <untyped> bigint)
decodeSchedule
func(s string) []v1.Slot- OID
- 0850bb…5bce:55
decodeSchedule details
encodeSchedule
func(ss []v1.Slot) string- OID
- 0850bb…5bce:56
encodeSchedule details
cursor
typecursor walks an encoded schedule a slot at a time without decoding it: after next, the slot's body is s\[b:i] and it plays from start to end.
Value
v1.cursor
idxW
untyped bigint// a ring index entry
Value
(6 <untyped> bigint)
homesKey
func(trackID int) (string, int)- OID
- 0850bb…5bce:57
homesKey details
homeEntry
func(stationID int, slot int) string- OID
- 0850bb…5bce:58
homeEntry details
homeSlot
func(e string, stationID int) (int, bool)homeSlot finds a station's slot in an entry.
- OID
- 0850bb…5bce:59
homeSlot details
energy
[20]intenergy orders the genres from calm to intense; neighbours blend well.
- OID
- 0850bb…5bce:61
energy details
dayparts
[8]intdayparts is the target index in energy for each 3-hour block of the UTC day: Jazz, Ambient, Lo-fi, World, Pop, Rock, House, then Drum & Bass at the peak.
- OID
- 0850bb…5bce:63
dayparts details
hourGenre
func(t *v1.tx, ts int64) inthourGenre is the genre Main relays at ts: the daypart's target, one step below it in the block's first hour, above it in the last, or the nearest genre with a live track (0: none).
- OID
- 0850bb…5bce:64
hourGenre details
HourGenre
func(at int64) intHourGenre is the genre Main relays at unix time at (0: none), for pages that explain it.
- OID
- 0850bb…5bce:66
HourGenre details
ScheduleJSON
func(stationID int, horizon int) stringScheduleJSON returns what a station plays from now until now+horizon seconds (60..7200, at most 60 entries): programmed slots and the rotation between them (on Main, the hour's genre station, simulcast and cut at each hour). A client plays entry i from offset+max(0, clock-start) and resyncs on "now". "relay" marks, on Main, an entry that is not Main's own slot but the hour's genre station simulcast (its picks included). "sponsored" is the refund its artist pays the picker (0: a normal pick), "at" the time a booked pick asked for (0: none). "booked" lists every booked pick still to air, whatever the horizon, and those that aired in the last hour (they count toward their clock hour's cap until they fold): {"track","start","end","at","by","note"}. Fetch it again every few minutes, not every second.
- OID
- 0850bb…5bce:67
ScheduleJSON details
StationsJSON
func() stringStationsJSON lists every station with what it plays now.
- OID
- 0850bb…5bce:69
StationsJSON details
struckMark
untyped stringValue
"struck:"
noteKey
func(stationID int, start int64) string- OID
- 0850bb…5bce:70
noteKey details
ReportNote
func(stationID int, start int64)ReportNote flags the dedication of the slot starting at start. Only a listener with the reputation sponsored picks need (a first pick a week old, 3 normal picks this 15-day period and the one before: sponsorBlock) may report, so throwaway wallets cannot; the third such listener hides it at once, with no moderator involved. A first hidden dedication is a strike; a second within muteFor pauses its author's dedications for muteFor (the admin can lift it: Unmute).
- OID
- 0850bb…5bce:72
ReportNote details
RestoreNote
func(stationID int, start int64)RestoreNote shows again a dedication hidden by reports by mistake and clears its author's strike (Unmute lifts a pause). Radio admin only.
- OID
- 0850bb…5bce:73
RestoreNote details
SetModBot
func(pubKeyHex string)SetModBot names the moderation robot by its Ed25519 public key in hex ("" turns dedications off). Radio admin only.
- OID
- 0850bb…5bce:74
SetModBot details
MutedUntil
func(who .uverse.address) int64MutedUntil returns the unix time until which who's dedications are paused after reports, 0 when they are not: the moderation robot refuses to sign for a muted author.
- OID
- 0850bb…5bce:75
MutedUntil details
Unmute
func(who .uverse.address)Unmute lets a muted listener dedicate again before the week ends, e.g. after reports by throwaway wallets. Radio admin only.
- OID
- 0850bb…5bce:76
Unmute details
noteSlot
func(t *v1.tx, stationID int, start int64) (*v1.station, *v1.Slot)noteSlot finds the dedicated slot starting at start. On Main between its own picks it is the genre station's slot Main simulcast: the genre of the hour the slot began in, or of now when the hour changed under it.
- OID
- 0850bb…5bce:77
noteSlot details
PublishTrack
func(title string, genre int, duration string, license string, cmo string, credits string, audio string, audioSHA string, cover string, coverSHA string, splits string, rights string) intPublishTrack publishes a track by the caller's own artist profile (the arguments are catalog.PublishFor's) and puts it on the air in the same transaction: the main station, its genre station and New this week.
- OID
- 0850bb…5bce:78
PublishTrack details
ImportTrack
func(artistID int, title string, genre int, duration string, license string, credits string, audio string, audioSHA string, cover string, coverSHA string, sourceURL string, attribution string) intImportTrack adds a curated or Audius track to an unclaimed artist (the arguments are catalog.ImportFor's) and puts it on the air, New this week left out: an import is not a new release. The catalog admin only, from its wallet or a realm that holds the role (a launch import).
- OID
- 0850bb…5bce:80
ImportTrack details
maxImportBatch
untyped bigintmaxImportBatch bounds ImportTracks: each track costs a few M gas once the realms are loaded, so a full batch stays far under the block's gas.
Value
(25 <untyped> bigint)
ImportTracks
func(batch string) intImportTracks imports up to maxImportBatch tracks in one transaction, so the realms load once for the batch instead of once per track. batch holds one track per line ("\\n"), ImportTrack's 12 arguments separated by tabs ("\\t"; neither can appear in a valid field). All or nothing: a bad track panics the whole transaction (a malformed line is named before anything is written). It returns the id of the last track. Admin only, as ImportTrack.
- OID
- 0850bb…5bce:81
ImportTracks details
EditTrack
func(trackID int, title string, genre int, duration string, credits string, audio string, audioSHA string, cover string, coverSHA string)EditTrack fixes a track's details (the arguments are catalog.EditFor's). A new genre or duration is applied to the stations in the same transaction, as Refresh does; other details need nothing on air.
- OID
- 0850bb…5bce:82
EditTrack details
onAir
func(id int, isNew bool)onAir ingests the track the catalog just added, with Sync's own code: it is the next one (Sync and every add keep the stations level with the catalog), so this is one track's work whatever the catalog size.
- OID
- 0850bb…5bce:83
onAir details
airNext
func(t *v1.tx, id int, isNew bool)- OID
- 0850bb…5bce:84
airNext details
Queue
func(stationID int, trackID int)Queue programs a track on a station and adds it to Listeners' choice. It starts after the last track a listener programmed, or when the song on air ends: nothing is cut. On Main it starts at once over the hour's relay (the app crossfades), which resumes after it. Limits per station: one waiting slot per listener, two per artist, a track at most once, 30 upcoming.
- OID
- 0850bb…5bce:85
Queue details
QueueAt
func(stationID int, trackID int, at int64)QueueAt is Queue for a chosen time: at (unix, UTC) between 15 minutes and 24 hours from now; 0 is Queue. The pick starts at the first track boundary at or after at (on Main, at at: the relay's track fades out as for any pick), unless listener picks fill that moment, then right after them. It keeps its time: later picks go before it only if they end by then, else after it. Every Queue rule applies, the 3-hour replay gap around at; the 2-hour airtime cap does not, but at most 4 picks are booked per station and clock hour and at most 15 booked picks wait per station.
- OID
- 0850bb…5bce:87
QueueAt details
QueueWithNote
func(stationID int, trackID int, note string, expires int64, sigHex string)QueueWithNote is Queue with a dedication shown on air ("for Marie!"). The moderation robot judges it before the transaction (word filter and a moderation model, app/netlify/functions/dedication.mts) and signs NoteMessage(note, expires): the listener sends that certificate and pays their own gas, so a dedication shows at once and costs GnoRadio nothing. It must also pass p/gnoradio/safe (plain text, no link, no blocked word). Listeners can report it: three reports hide it and give its author a strike; a second hidden dedication within a week pauses their dedications for a week (ReportNote). The pause is per wallet: an author can dedicate again from a fresh one, which reports hide and pause the same way (accepted residual; the robot and the word filter still judge every note).
- OID
- 0850bb…5bce:88
QueueWithNote details
QueueWithNoteAt
func(stationID int, trackID int, at int64, note string, expires int64, sigHex string)QueueWithNoteAt is QueueWithNote for a chosen time (see QueueAt; 0: now).
- OID
- 0850bb…5bce:89
QueueWithNoteAt details
queueWithNote
func(stationID int, trackID int, at int64, note string, expires int64, sigHex string)- OID
- 0850bb…5bce:90
queueWithNote details
NoteMessage
func(author .uverse.address, stationID int, note string, expires int64) stringNoteMessage is what the moderation robot signs to approve a dedication by author on stationID until expires (unix seconds), on this chain and this GnoRadio deployment (its data realm) only: "gnoradio-note|\<chain id>|\<data realm>|\<author>|\<station>|\<note>|\<expires>". A certificate seen in a public transaction serves no other wallet, station or deployment.
- OID
- 0850bb…5bce:91
NoteMessage details
checkNote
func(author .uverse.address, stationID int, note string, expires int64, sigHex string)- OID
- 0850bb…5bce:92
checkNote details
CuratorQueue
func(stationID int, trackID int)CuratorQueue programs a track like Queue but without the per-listener and per-artist quotas (the duplicate, genre and queue-size rules still apply). Radio admin only.
- OID
- 0850bb…5bce:93
CuratorQueue details
queue
func(caller .uverse.address, stationID int, trackID int, curator bool, sponsored bool, note string, at int64)- OID
- 0850bb…5bce:94
queue details
insert
func(sl []v1.Slot, s v1.Slot) ([]v1.Slot, int)insert puts s in a schedule, sorted by start, and returns its index.
- OID
- 0850bb…5bce:95
insert details
noteReserve
func(st *v1.station, kept int) intnoteReserve is the record room the other plain picks a station may still take need: a slot and a replay entry each, plus its curator top at full.
- OID
- 0850bb…5bce:96
noteReserve details
NumGenres
untyped bigintNumGenres is the catalog's: genre stations are 1..NumGenres.
Value
(20 <untyped> bigint)
MainStation
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(0 <untyped> bigint)
NewStation
untyped bigint// the newest newCap ingested tracks
Value
(21 <untyped> bigint)
ChoiceStation
untyped bigint// the last choiceCap distinct listener picks
Value
(22 <untyped> bigint)
numStations
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(23 <untyped> bigint)
newCap
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(300 <untyped> bigint)
choiceCap
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(500 <untyped> bigint)
maxQueue
untyped bigint// upcoming slots per station
Value
(30 <untyped> bigint)
maxPerArtistQ
untyped bigint// upcoming slots per artist and station
Value
(2 <untyped> bigint)
maxSyncBatch
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(200 <untyped> bigint)
maxRefreshBatch
untyped bigintStation ids are stored keys in the permanent data realm (schedules, drops, notes, curator ranks): Main 0, genres 1..NumGenres, New, Choice. A later release must keep them, and add any new station after Choice.
Value
(50 <untyped> bigint)
foldAfter
untyped bigint// programmed slots ended this long ago fold into the epoch
Value
(3600 <untyped> bigint)
queueCooldown
untyped bigint// a listener may queue once per station per hour
Value
(3600 <untyped> bigint)
replayGap
untyped bigint// a track picked on a station cannot be picked there again for 3 hours, by anyone
Value
(10800 <untyped> bigint)
maxAheadAir
untyped bigint// listener-programmed airtime ahead on a station, seconds
Value
(7200 <untyped> bigint)
maxNote
untyped bigint// characters of a dedication
Value
(40 <untyped> bigint)
noteCertLife
untyped bigint// seconds a moderation certificate may still have to live
Value
(900 <untyped> bigint)
hideAfter
untyped bigint// distinct reputable listeners (sponsorBlock) reporting a dedication hide it
Value
(3 <untyped> bigint)
muteFor
untyped bigint// a second hidden dedication within this time mutes its author this long
Value
(604800 <untyped> bigint)
bookMin
untyped bigint// a pick booked for a time: at least this far ahead
Value
(900 <untyped> bigint)
bookMax
untyped bigint// and at most this far
Value
(86400 <untyped> bigint)
maxBookedHour
untyped bigint// booked picks per station and clock hour (UTC)
Value
(4 <untyped> bigint)
maxKept
untyped bigint// listener slots a station keeps, aired ones included until they fold
Value
(90 <untyped> bigint)
maxBooked
untyped bigint// booked picks waiting per station
Value
(15 <untyped> bigint)
maxTrack
untyped bigint// the catalog's longest track, seconds
Value
(1200 <untyped> bigint)
recordHeadroom
untyped bigint// bytes a station record keeps free for the writes that follow a pick
Value
(1024 <untyped> bigint)
plainSlot
untyped bigint// record bytes of a listener slot without a dedication: 25, an address, at most 7 of gap
Value
(72 <untyped> bigint)
dataPath
untyped stringdataPath is the data realm: certificates are bound to it.
Value
"gno.land/r/nym-alexiscolin000/gnoradio/data"
Slot
typeSlot is a track a listener (or a curator) programmed on a station. Dur is captured when queued so later catalog edits cannot move the timeline.
Value
v1.Slot
self
string// this realm's path
Value
"gno.land/r/nym-alexiscolin000/gnoradio/radio/v1"
admin
*v0.Role// the radio admin; nil when a release before renounced it
- OID
- 0850bb…5bce:137
admin details
init.153
func()- OID
- 0850bb…5bce:99
init.153 details
Sync
func(max int) intSync ingests up to max catalog tracks not yet on the stations into the main station, the station of their genre and New; the catalog's most liked tracks join Listeners' choice. Main's flow needs no Sync (flow.gno). Anyone may call it. PublishTrack and ImportTrack put each new track on the air themselves (publish.gno), so this is a safety net: a track is never ingested twice (the flow record counts the synced ones). A track that is not playable yet is added silent (duration 0) and Refresh turns it on.
- OID
- 0850bb…5bce:101
Sync details
ingest
func(t *v1.tx, ts int64, max int, joinNew bool) intingest adds up to max newly published tracks to the stations, and to New when joinNew (a launch-catalog import is not a new release).
- OID
- 0850bb…5bce:102
ingest details
Refresh
func(trackID int)Refresh re-reads a track from the catalog and updates its rotation slots: a hidden track goes silent, a restored one comes back, an edited duration is applied. Programmed slots of a track that is no longer playable are dropped. Anyone may call it. A slot the admin dropped stays silent.
- OID
- 0850bb…5bce:103
Refresh details
RefreshArtist
func(artistID int, offset int) intRefreshArtist refreshes up to maxRefreshBatch synced tracks of an artist, from offset in the artist's track list, so hiding (or restoring) a whole artist takes a few calls instead of one per track. It returns the offset to pass next, or 0 when the list is done. Anyone may call it.
- OID
- 0850bb…5bce:104
RefreshArtist details
refresh
func(t *v1.tx, trackID int)- OID
- 0850bb…5bce:105
refresh details
NowPlaying
func(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.
- OID
- 0850bb…5bce:106
NowPlaying details
OnAirNote
func(stationID int) stringOnAirNote returns the dedication of the programmed slot on air ("" when none, or once reports hid it).
- OID
- 0850bb…5bce:107
OnAirNote details
OnAirPay
func(stationID int) int64OnAirPay is the refund of the sponsored pick on air (0: none), for labels.
- OID
- 0850bb…5bce:108
OnAirPay details
UpNext
func(stationID int) []v1.SlotUpNext returns the slots listeners programmed on a station that have not started yet.
- OID
- 0850bb…5bce:109
UpNext details
StationCount
func() intStationCount returns the number of stations (ids 0..StationCount()-1).
- OID
- 0850bb…5bce:110
StationCount details
StationName
func(stationID int) stringStationName is "Main", the genre name, "New this week" or "Listeners' choice".
- OID
- 0850bb…5bce:111
StationName details
StationInfo
func(stationID int) (tracks int, loop int64, queued int)StationInfo returns how many tracks rotate on a station and the loop length.
- OID
- 0850bb…5bce:112
StationInfo details
Pending
func() intPending returns how many catalog tracks are not on the stations yet: 0, since publishing puts a track on the air (Sync is the safety net).
- OID
- 0850bb…5bce:113
Pending details
PickRules
func() (cooldown int64, replay int64, ahead int64, queue int, perArtist int, bookFrom int64, bookTo int64, bookedPerHour int, booked int)PickRules returns the limits on listeners' picks, for pages that explain them: one pick per cooldown per station, a track not again within replay, at most ahead seconds and queue slots waiting, perArtist waiting per artist, booked picks bookFrom to bookTo ahead, bookedPerHour per clock hour and booked of the queue slots at most.
- OID
- 0850bb…5bce:114
PickRules details
now
func() int64- OID
- 0850bb…5bce:115
now details
mustStation
func(id int) int- OID
- 0850bb…5bce:116
mustStation details
userCaller
func() .uverse.address- OID
- 0850bb…5bce:117
userCaller details
noPayment
func()- OID
- 0850bb…5bce:118
noPayment details
abs64
func(n int64) int64- OID
- 0850bb…5bce:119
abs64 details
max64
func(a int64, b int64) int64- OID
- 0850bb…5bce:120
max64 details
repPeriod
untyped bigint// reputation counters roll over every 15 days
Value
(1296000 <untyped> bigint)
repAge
untyped bigint// a wallet's first pick must be this old
Value
(604800 <untyped> bigint)
repPicks
untyped bigint// normal picks this period and the one before
Value
(3 <untyped> bigint)
sponsorShare
untyped bigintValue
(1800 <untyped> bigint)
sponsorWindow
untyped bigintValue
(3600 <untyped> bigint)
sponsorKey
func(stationID int, addr .uverse.address) string- OID
- 0850bb…5bce:121
sponsorKey details
QueueSponsored
func(stationID int, trackID int)QueueSponsored is Queue paid by the artist: once the pick has aired in full, ClaimPickPayout sends the picker the artist's refund (catalog PromoOffer). No dedication. A wallet has one sponsored pick open per station: it must be collected (or have lapsed) before the next.
- OID
- 0850bb…5bce:123
QueueSponsored details
QueueSponsoredAt
func(stationID int, trackID int, at int64)QueueSponsoredAt is QueueSponsored for a chosen time (see QueueAt; 0: now). The refund lapses 7 days after the booked time plus the track's length.
- OID
- 0850bb…5bce:124
QueueSponsoredAt details
queueSponsored
func(stationID int, trackID int, at int64)- OID
- 0850bb…5bce:125
queueSponsored details
ClaimPickPayout
func(stationID int, start int64)ClaimPickPayout sends the caller the refund of their sponsored pick that started at start on stationID, once it has aired in full.
- OID
- 0850bb…5bce:126
ClaimPickPayout details
sponsorBlock
func(t *v1.tx, addr .uverse.address) stringsponsorBlock says why a wallet may not take sponsored picks yet ("" when it may).
- OID
- 0850bb…5bce:127
sponsorBlock details
sponsorQuota
func(st *v1.station, artistID int, dur int64, airs int64, plays int64)sponsorQuota: one sponsored pick per artist per station and hour, and sponsored airtime at most a quarter of the listener window, both around airs (now, or the time booked). The share counts the listener window from airs; the per-artist hour is checked around plays, when the pick really airs (review R31).
- OID
- 0850bb…5bce:128
sponsorQuota details
reserve
func(t *v1.tx, picker .uverse.address, stationID int, trackID int, start int64, dur int64, held int64) int64reserve books the artist's refund for a sponsored slot, lapsing after held.
- OID
- 0850bb…5bce:129
reserve details
hold
typehold is a sponsored slot's reservation in the catalog: filed under the end it was reserved for (the slot may have moved since). reserved is when it was taken, 0 once the slot started airing: only a pick that never aired gives its daily counts back.
Value
v1.hold
unsponsor
func(t *v1.tx, stationID int, s v1.Slot, ts int64) (v1.hold, bool)unsponsor forgets the open record of a sponsored slot cut at ts before it started, and returns its reservation; ok is false when there was none. A slot already on air keeps its record: whoever cut it (a hide, a genre edit, a drop), the picker earned the refund and collects it once its end passes.
- OID
- 0850bb…5bce:130
unsponsor details
release
func(cut []v1.hold)release gives the reservations of cut sponsored slots back to their artists. While the catalog is paused it gives nothing back, so the radio can still drop slots: each hold lapses back to its budget by itself.
- OID
- 0850bb…5bce:131
release details
PickPayoutStatus
func(addr .uverse.address, stationID int, start int64) stringPickPayoutStatus says what ClaimPickPayout would do for addr's sponsored pick that started at start on stationID: "ok" (it pays), "airing" (not finished yet), "lapsed" (nothing to pay: lapsed or cancelled; collecting only clears it) or "none" (no such open pick).
- OID
- 0850bb…5bce:132
PickPayoutStatus details
payoutStatus
func(f []string) string- OID
- 0850bb…5bce:133
payoutStatus details
SponsoredJSON
func(addr .uverse.address) stringSponsoredJSON lists a wallet's sponsored picks not collected yet, with whether it may take new ones and each one's PickPayoutStatus: {"block":"why not, or empty","open":\[{"station","start","track","end","amount","status"}]}.
- OID
- 0850bb…5bce:134
SponsoredJSON details
choose
func(t *v1.tx, trackID int, dur int64, ts int64)choose adds a synced track to Listeners' choice unless it is already there.
- OID
- 0850bb…5bce:135
choose details
pickW
untyped bigintThe replay record of a station (in its record: a pick changes both) is fixed-width entries, the track (4 digits) then the pick time (6), read by slicing.
Value
(10 <untyped> bigint)