From 62ed95b3ca8740951ecbcfa7d4dcbac6e2f068d7 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Thu, 30 Jul 2026 15:12:02 -0500 Subject: [PATCH] Show annotations in lyrics --- api/annotation.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 api/annotation.php diff --git a/api/annotation.php b/api/annotation.php new file mode 100644 index 0000000..87129f0 --- /dev/null +++ b/api/annotation.php @@ -0,0 +1,35 @@ + false, 'text' => '']; + +if (!cfg('dumb.enabled')) json_out($empty); + +$path = (string) ($_POST['path'] ?? $_GET['path'] ?? ''); +if (!preg_match('#^/\d+/[^/]+/[^/]+/annotations$#', $path)) json_out($empty); + +$raw = http_get(cfg('dumb.url') . $path, 5); +if ($raw === null) json_out($empty); + +$body = (string) dot_get(json_decode($raw, true), 'body.html', ''); +if ($body === '') json_out($empty); + +$text = trim(container_to_text($body)); +json_out(['found' => $text !== '', 'text' => $text]);