Forum teuk.org

🎵🪄 MB705 — Apple Music Gets a Shorter, Portable Badge

in Mediabot · started by TeuK · 4d ago

TeuK · 4d ago

Version: 3.4dev-20260827_122512
Commit: 8c5cddb
Commit message: MB705: charm Apple Music into a portable ⌘Music badge — no private-use runes 🎵🪄

MB705 is a deliberately small visual change with one important compatibility goal: make the Apple Music badge shorter and cleaner without relying on Apple’s private-use logo character.

The canonical IRC badge is now:

[⌘Music]

instead of:

[AppleMusic]

⌘ Why U+2318?

The obvious Apple-looking glyph, , lives at Unicode code point U+F8FF, inside the Private Use Area.

That means its rendering depends on the font and platform. It may look correct on Apple systems while appearing as an empty square or missing glyph elsewhere.

MB705 therefore uses the standard Unicode Command symbol:

⌘
U+2318

The Perl source expresses it explicitly as:

"\x{2318}Music"

This avoids embedding a private-use Apple rune into Mediabot’s public source while keeping the badge compact and recognizably Apple-flavored.

🧩 What changed

The runtime Apple Music badge in:

Mediabot/External/URL.pm

was changed from:

[AppleMusic]

to:

[⌘Music]

The existing regression contracts were updated accordingly:

t/cases/200_urltitle_badge_reset_stringify.t
t/cases/702_mb492_url_rich_badges.t
t/cases/855_mb672_applemusic_lookup_async.t

The public changelog was updated as well.

No parallel rendering path was introduced.

🛡️ What did not change

This is a display-only change.

The following behavior remains untouched:

  • the AppleMusic chanset name;
  • Apple Music URL detection;
  • lookup and metadata extraction;
  • asynchronous execution;
  • fallback behavior;
  • URL anti-repeat/cache behavior;
  • badge colors;
  • the mandatory IRC reset after the badge;
  • song title, artist, album, year and duration formatting.

In other words, the spell changed the label on the cauldron, not the potion inside it. 🧪✨

🧪 Validation

The change was validated through the normal Mediabot development gates.

Focused Apple Music and URL regression:

5 / 5 files
358 / 358 tests PASS
2 seconds

Fast validation lane:

364 / 364 files
6513 / 6513 tests PASS
66 seconds

A controlled DEV runtime reload then confirmed the new code was active.

The badge was validated live on IRC in #radiocapsule:

[⌘Music]

Finally, the complete suite was run once immediately before commit:

868 / 868 files
17430 / 17430 tests PASS
218 seconds

No additional full-suite run was performed after that successful final gate.

🏰 Result

Apple Music responses are now a little shorter, a little cleaner, and more portable:

[⌘Music] I Love Rock 'N Roll - by Joan Jett & The Blackhearts - ...

No private-use glyphs, no special Apple font dependency, no changes to the underlying Apple Music machinery.

Just one small Command symbol doing exactly what it says on the tin.

Mischief managed. 🎶⚡

You must be logged in to reply.