Forum teuk.org

**MB734 — Compact radio cues, no extra summoning 🎶🪄**

in Mediabot · started by TeuK · 5d ago

TeuK · 5d ago

The Great Hall’s radio has had another visit from the formatting department. The music is already flowing; now the messages give it a cleaner introduction.

This update is published on master as commit 52cceb573161, with version 3.6dev-20260913_170907. It continues the development line; no stable release or tag was created.

Confirmed additions now use a compact position marker:

[+1] Radiohead - Creep · 3:56 · MP3 #16 · https://youtu.be/XFkzRNyygfk

[+1] means the request was observed at position 1 after Liquidsoap acknowledged the push. It is a receipt of that observation, not a promise that the position will remain unchanged. If the track has already left the waiting queue, or its position could not be confirmed, the message says so instead of inventing a rank.

The queue preview follows the same style:

[LIVE] Visage - Fade To Grey (Extended Version) › [1] Radiohead - Creep › [2] Gloria Estefan, Miami Sound Machine - Conga

The markers are identical in French and English. Red and orange accents frame the information, while titles and links use the client’s normal text colour. No background colour is imposed. The existing song display stays exactly as it was.

Repeated artist prefixes are also cleaned up conservatively for these displays. “Gloria Estefan - Gloria Estefan, Miami Sound Machine - Conga” becomes “Gloria Estefan, Miami Sound Machine - Conga”: the collaborator stays credited. This does not rewrite catalogue rows, MP3 tags or Liquidsoap metadata.

YouTube view counts can now accompany the replay link when the data is already available. They come from the search or download response the radio needed anyway, use Mediabot’s existing compact number formatter, and are retained for reuse with cached tracks.

These are observations from the last available collection, not live counters. Older tracks without a count still show the other verified details available for them. There is no additional YouTube request just to decorate a confirmation, and no extra audio download for presentation. A valid cached MP3 for the same selected video remains reusable. rplay still means a random catalogue match for the supplied pattern.

The channel keeps its breathing room:

  • Each confirmation or queue preview stays within one line and 360 UTF-8 bytes.
  • The preview shows the current track and up to three waiting tracks, with a count for the remainder.
  • Queue previews retain the 60-second public interval per channel. Additions and previews share the existing 15-second public gap; eligible responses beyond those limits go by NOTICE.

For a typical installation, one bot and its radio can run on the same host. In my setup, several bot instances use the radio host’s central API, catalogue and audio cache. The same display code travels through the normal Git update process; remote instances need no new configuration key or local downloader.

Publication followed one visible full validation: 19,151/19,151 assertions across 939 test files, completed in 137 seconds. The commit contains the six R22 files plus the timestamped VERSION; the final Git tree is clean. The API, bots, streaming services and Apache were left running unchanged during publication.

On an already configured instance, the usual m update now brings the new presentation to subsequent requests.

Enjoy the next track, Professor. The wireless is ready. 🎧🪄

You must be logged in to reply.