Musik: Zurueck-Knopf (von vorn bzw. voriger Titel, Taste P); Patchnotes zu Puffer/Vorab-Download im Bot

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-10-29 14:30:20 +01:00
parent e070316cf2
commit c55768290d
5 changed files with 6 additions and 1 deletions

View file

@ -364,6 +364,7 @@
if (tag === 'input' || tag === 'textarea' || tag === 'select' || event.ctrlKey || event.altKey || event.metaKey) return; if (tag === 'input' || tag === 'textarea' || tag === 'select' || event.ctrlKey || event.altKey || event.metaKey) return;
if (event.key === ' ') { event.preventDefault(); control('toggle'); } if (event.key === ' ') { event.preventDefault(); control('toggle'); }
if (event.key === 'n' || event.key === 'N') control('skip'); if (event.key === 'n' || event.key === 'N') control('skip');
if (event.key === 'p' || event.key === 'P') control('previous');
}); });
$('[data-music-join]').addEventListener('click', function () { $('[data-music-join]').addEventListener('click', function () {
var channel = $('[data-music-channels]').value; var channel = $('[data-music-channels]').value;

View file

@ -176,6 +176,7 @@ function icon(string $name): string
'shuffle' => '<polyline points="16 3 21 3 21 8"/><path d="M4 20 21 3"/><polyline points="21 16 21 21 16 21"/><path d="m15 15 6 6"/><path d="M4 4l5 5"/>', 'shuffle' => '<polyline points="16 3 21 3 21 8"/><path d="M4 20 21 3"/><polyline points="21 16 21 21 16 21"/><path d="m15 15 6 6"/><path d="M4 4l5 5"/>',
'pause' => '<rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/>', 'pause' => '<rect x="6" y="4" width="4" height="16" rx="1"/><rect x="14" y="4" width="4" height="16" rx="1"/>',
'skip' => '<path d="M5 4l10 8-10 8z"/><line x1="19" y1="5" x2="19" y2="19"/>', 'skip' => '<path d="M5 4l10 8-10 8z"/><line x1="19" y1="5" x2="19" y2="19"/>',
'skip-back' => '<path d="M19 4 9 12l10 8z"/><line x1="5" y1="5" x2="5" y2="19"/>',
'stop' => '<rect x="5" y="5" width="14" height="14" rx="2"/>', 'stop' => '<rect x="5" y="5" width="14" height="14" rx="2"/>',
'repeat' => '<polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/>', 'repeat' => '<polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/>',
'volume' => '<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.5 8.5a5 5 0 0 1 0 7"/><path d="M19 5.5a9 9 0 0 1 0 13"/>', 'volume' => '<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.5 8.5a5 5 0 0 1 0 7"/><path d="M19 5.5a9 9 0 0 1 0 13"/>',

View file

@ -18,7 +18,7 @@ const MUSIC_API_TIMEOUT = 60;
const MUSIC_UPLOAD_MAX = 25 * 1024 * 1024; const MUSIC_UPLOAD_MAX = 25 * 1024 * 1024;
const MUSIC_UPLOAD_EXTENSIONS = ['mp3', 'ogg', 'm4a', 'wav', 'flac', 'opus']; const MUSIC_UPLOAD_EXTENSIONS = ['mp3', 'ogg', 'm4a', 'wav', 'flac', 'opus'];
const MUSIC_QUERY_MAX = 500; const MUSIC_QUERY_MAX = 500;
const MUSIC_ACTIONS = ['toggle', 'pause', 'resume', 'skip', 'stop', 'shuffle', 'loop', 'volume', 'remove', 'clear', 'move', 'jump', 'seek']; const MUSIC_ACTIONS = ['toggle', 'pause', 'resume', 'skip', 'previous', 'stop', 'shuffle', 'loop', 'volume', 'remove', 'clear', 'move', 'jump', 'seek'];
const MUSIC_BOTS = ['nezekan' => 'Nezekan', 'siel' => 'Siel']; const MUSIC_BOTS = ['nezekan' => 'Nezekan', 'siel' => 'Siel'];
/** /**

View file

@ -38,6 +38,8 @@ const PATCHNOTES = [
'changes' => [ 'changes' => [
['type' => 'neu', 'area' => 'Musik', 'text' => 'Neue Seite „Musik“: Bot in einen Sprachkanal holen oder rausschicken, YouTube-/YouTube-Music-/Spotify-Links (auch Playlists und Alben) oder einfach einen Suchbegriff abspielen, Warteschlange ansehen, Titel überspringen, pausieren, Zufall, Schleife und Lautstärke.'], ['type' => 'neu', 'area' => 'Musik', 'text' => 'Neue Seite „Musik“: Bot in einen Sprachkanal holen oder rausschicken, YouTube-/YouTube-Music-/Spotify-Links (auch Playlists und Alben) oder einfach einen Suchbegriff abspielen, Warteschlange ansehen, Titel überspringen, pausieren, Zufall, Schleife und Lautstärke.'],
['type' => 'neu', 'area' => 'Discord', 'text' => 'Dasselbe geht im Discord mit /musik (join, play, skip, pause, weiter, stop, leave, …). Nach 5 Minuten allein im Kanal geht der Bot von selbst.'], ['type' => 'neu', 'area' => 'Discord', 'text' => 'Dasselbe geht im Discord mit /musik (join, play, skip, pause, weiter, stop, leave, …). Nach 5 Minuten allein im Kanal geht der Bot von selbst.'],
['type' => 'behoben', 'area' => 'Musik', 'text' => 'Titel starteten spät und „spulten“ dann ein paar Sekunden vor: Der Bot sammelt jetzt erst zwei Sekunden Ton, bevor er loslegt, und lädt den nächsten Titel schon während des laufenden vor. Bei Aussetzern gibt es kurz Stille statt Schnelldurchlauf.'],
['type' => 'neu', 'area' => 'Musik', 'text' => 'Zurück-Knopf (auch Taste P und /musik zurueck): nach ein paar Sekunden noch einmal von vorn, sonst zum vorigen Titel.'],
['type' => 'neu', 'area' => 'Musik', 'text' => 'Zwei Musikbots: Neben Nezekan spielt auch Siel bei uns Musik – ein Bot kann nur in einem Sprachkanal sein, mit zweien läuft Musik in zwei Kanälen gleichzeitig. Oben im Player wählst du den Bot; im Discord heißt es bei beiden /musik. Jeder Bot hat seine eigene Playlist.'], ['type' => 'neu', 'area' => 'Musik', 'text' => 'Zwei Musikbots: Neben Nezekan spielt auch Siel bei uns Musik – ein Bot kann nur in einem Sprachkanal sein, mit zweien läuft Musik in zwei Kanälen gleichzeitig. Oben im Player wählst du den Bot; im Discord heißt es bei beiden /musik. Jeder Bot hat seine eigene Playlist.'],
['type' => 'verbessert', 'area' => 'Musik', 'text' => 'Musik gibt es ab dem Rang Legionär – auf der Website über das Recht music.control der Rang-Gruppen, im Discord prüft der Bot die Rolle. Rekruten sehen die Seite nicht und bekommen bei /musik einen Hinweis.'], ['type' => 'verbessert', 'area' => 'Musik', 'text' => 'Musik gibt es ab dem Rang Legionär – auf der Website über das Recht music.control der Rang-Gruppen, im Discord prüft der Bot die Rolle. Rekruten sehen die Seite nicht und bekommen bei /musik einen Hinweis.'],
['type' => 'neu', 'area' => 'Musik', 'text' => 'Zum laufenden Titel gibt es das Vorschaubild, wer ihn gewünscht hat und was als Nächstes kommt. Ein Klick in den Fortschrittsbalken spult, Leertaste pausiert, N springt weiter. In der Warteschlange lässt sich ein Titel nach vorn holen (⤴), sofort abspielen (▶) oder entfernen. Unter „Zuletzt gespielt“ holst du einen Titel mit ↻ noch einmal. Ist der Bot in keinem Kanal, kommt er beim Abspielen gleich in den gewählten.'], ['type' => 'neu', 'area' => 'Musik', 'text' => 'Zum laufenden Titel gibt es das Vorschaubild, wer ihn gewünscht hat und was als Nächstes kommt. Ein Klick in den Fortschrittsbalken spult, Leertaste pausiert, N springt weiter. In der Warteschlange lässt sich ein Titel nach vorn holen (⤴), sofort abspielen (▶) oder entfernen. Unter „Zuletzt gespielt“ holst du einen Titel mit ↻ noch einmal. Ist der Bot in keinem Kanal, kommt er beim Abspielen gleich in den gewählten.'],

View file

@ -45,6 +45,7 @@ include __DIR__ . '/includes/header.php';
<div class="music-controls"> <div class="music-controls">
<div class="music-transport" role="group" aria-label="Steuerung"> <div class="music-transport" role="group" aria-label="Steuerung">
<button type="button" class="music-btn" data-music-control="shuffle" title="Zufall an/aus" aria-label="Zufall"><?= icon('shuffle') ?></button> <button type="button" class="music-btn" data-music-control="shuffle" title="Zufall an/aus" aria-label="Zufall"><?= icon('shuffle') ?></button>
<button type="button" class="music-btn" data-music-control="previous" title="Von vorn / voriger Titel (P)" aria-label="Zurück"><?= icon('skip-back') ?></button>
<button type="button" class="music-btn is-main" data-music-control="toggle" title="Pause / Weiter (Leertaste)" aria-label="Pause / Weiter"> <button type="button" class="music-btn is-main" data-music-control="toggle" title="Pause / Weiter (Leertaste)" aria-label="Pause / Weiter">
<span class="music-ico-play"><?= icon('play') ?></span><span class="music-ico-pause"><?= icon('pause') ?></span> <span class="music-ico-play"><?= icon('play') ?></span><span class="music-ico-pause"><?= icon('pause') ?></span>
</button> </button>