nixamp 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-keys.d.ts +1 -1
- package/dist/ai-keys.js +2 -0
- package/dist/lyrics-publish.d.ts +56 -0
- package/dist/lyrics-publish.js +194 -0
- package/dist/lyrics.d.ts +67 -0
- package/dist/lyrics.js +145 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +28 -0
- package/dist/station-cli.js +42 -0
- package/dist/station-page.d.ts +1 -1
- package/dist/station-page.js +39 -3
- package/dist/station-routes.d.ts +9 -0
- package/dist/station-routes.js +39 -1
- package/dist/station-usage.d.ts +1 -1
- package/dist/station-usage.js +5 -0
- package/dist/stations.d.ts +2 -0
- package/dist/stations.js +6 -0
- package/dist/track-facts.d.ts +4 -0
- package/dist/track-facts.js +8 -4
- package/package.json +1 -1
- package/src/ai-keys.ts +2 -0
- package/src/lyrics-publish.ts +203 -0
- package/src/lyrics.ts +161 -0
- package/src/server.ts +32 -0
- package/src/station-cli.ts +40 -0
- package/src/station-page.ts +39 -3
- package/src/station-routes.ts +46 -1
- package/src/station-usage.ts +5 -0
- package/src/stations.ts +4 -0
- package/src/track-facts.ts +11 -2
- package/web/dist/assets/{ar-S4rqddex.js → ar-DJAQCP6v.js} +1 -1
- package/web/dist/assets/{cs-BShF2rip.js → cs-BYeHBx_F.js} +1 -1
- package/web/dist/assets/{da-BO87iZOE.js → da-CR89gWR7.js} +1 -1
- package/web/dist/assets/{de-CUANqdKo.js → de-DPFsA0HC.js} +1 -1
- package/web/dist/assets/{es-BdUyDUC0.js → es-Bg5Vx2bB.js} +1 -1
- package/web/dist/assets/{fi-BBBq-Bd8.js → fi-BVpY7Uww.js} +1 -1
- package/web/dist/assets/{fr-DqZ3HEY8.js → fr-DsSofhGt.js} +1 -1
- package/web/dist/assets/{hi-BBMF8sCD.js → hi-DkSvHtix.js} +1 -1
- package/web/dist/assets/{hu-D1LEEcho.js → hu-D4Z2GpU0.js} +1 -1
- package/web/dist/assets/{id-CBC-Hup3.js → id-BzOPbgSu.js} +1 -1
- package/web/dist/assets/{it-sk9K0Y5L.js → it-BAT4YCiY.js} +1 -1
- package/web/dist/assets/{main-ByEHJWGn.js → main-Dpj3oiHi.js} +2 -2
- package/web/dist/assets/{nl-DioO6nqY.js → nl-CiTdg-si.js} +1 -1
- package/web/dist/assets/{ru-o2SYLX7L.js → ru-CJBuL5JA.js} +1 -1
- package/web/dist/assets/{station--cxhU1wr.css → station-BwDP2cuf.css} +1 -1
- package/web/dist/assets/station-DXRmjrqv.js +3 -0
- package/web/dist/assets/{sv-CCey7ex0.js → sv-Dptz7Qud.js} +1 -1
- package/web/dist/assets/{uk-C2gHK98V.js → uk-yL3tD6Kt.js} +1 -1
- package/web/dist/assets/{vi-B6AG6Gxz.js → vi-CuVvOIut.js} +1 -1
- package/web/dist/assets/{zh-Cnjg8Tp_.js → zh-kHhOVHwJ.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/station.html +9 -2
- package/web/dist/sw.js +21 -21
- package/web/dist/assets/station-CdQ9LR6K.js +0 -1
package/src/lyrics.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words of the song on the air, for a station's page.
|
|
3
|
+
*
|
|
4
|
+
* Two places they come from, in this order:
|
|
5
|
+
* 1. the file itself: an ID3 USLT frame (ffprobe calls it `lyrics-eng`, or
|
|
6
|
+
* `lyrics-<description>-<lang>`), a Vorbis/APE `LYRICS` or
|
|
7
|
+
* `UNSYNCEDLYRICS` tag. Suno writes the words it sang into USLT, so our
|
|
8
|
+
* own catalog carries them already;
|
|
9
|
+
* 2. nichedb.dev's lyrics, asked by artist and title, which is where a file
|
|
10
|
+
* without the tag gets them (and where ours are published back to:
|
|
11
|
+
* lyrics-publish.ts).
|
|
12
|
+
* Each answer is kept: the tags with the file (by size and time, TagReader),
|
|
13
|
+
* nichedb's for ten minutes, misses included, so a station of tracks nobody
|
|
14
|
+
* has words for asks once per track per ten minutes and never waits long.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface Lyrics {
|
|
18
|
+
title: string;
|
|
19
|
+
artist: string;
|
|
20
|
+
text: string;
|
|
21
|
+
/** "embedded" (the file's own tag) or "nichedb" (or what nichedb said its source was). */
|
|
22
|
+
source: string;
|
|
23
|
+
/** ISO 639-1 where we know the mapping, else what the tag said; "" when unsaid. */
|
|
24
|
+
language: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const NICHEDB_LYRICS = "https://nichedb.dev";
|
|
28
|
+
const MAX_TEXT = 20_000;
|
|
29
|
+
|
|
30
|
+
/** ID3 / ISO 639-2 codes for the languages we are likely to meet, as 639-1. */
|
|
31
|
+
const LANGS: Record<string, string> = {
|
|
32
|
+
eng: "en", deu: "de", ger: "de", fra: "fr", fre: "fr", spa: "es", ita: "it", por: "pt", nld: "nl", dut: "nl",
|
|
33
|
+
swe: "sv", nor: "no", nob: "nb", dan: "da", isl: "is", ice: "is", fin: "fi", jpn: "ja", kor: "ko", zho: "zh",
|
|
34
|
+
chi: "zh", rus: "ru", pol: "pl", ukr: "uk", tur: "tr", ara: "ar", heb: "he", hin: "hi", ces: "cs", cze: "cs",
|
|
35
|
+
ell: "el", gre: "el", hun: "hu", ron: "ro", rum: "ro", lat: "la", gle: "ga", cym: "cy", wel: "cy",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function language(code: string): string {
|
|
39
|
+
const lower = code.toLowerCase();
|
|
40
|
+
if (lower === "" || lower === "xxx" || lower === "und" || lower === "zxx") return "";
|
|
41
|
+
return LANGS[lower] ?? lower;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Text as it may be shown: newlines kept, control characters gone, trimmed, capped. */
|
|
45
|
+
export function cleanLyrics(text: string): string {
|
|
46
|
+
return text
|
|
47
|
+
.replace(/\r\n?/g, "\n")
|
|
48
|
+
// eslint-disable-next-line no-control-regex
|
|
49
|
+
.replace(/[\u0000-\u0008\u000b-\u001f\u007f]/g, "")
|
|
50
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
51
|
+
.trim()
|
|
52
|
+
.slice(0, MAX_TEXT);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The words a file's own tags carry (lower-cased names, as TagReader gives them), or null. */
|
|
56
|
+
export function lyricsFromTags(tags: Record<string, string>): { text: string; language: string } | null {
|
|
57
|
+
let best: { text: string; language: string } | null = null;
|
|
58
|
+
for (const [name, value] of Object.entries(tags)) {
|
|
59
|
+
let lang = "";
|
|
60
|
+
if (name === "lyrics" || name === "unsyncedlyrics" || name === "unsynced lyrics" || name === "unsynced_lyrics" || name === "uslt") {
|
|
61
|
+
lang = "";
|
|
62
|
+
} else if (name.startsWith("lyrics-") || name.startsWith("lyrics_")) {
|
|
63
|
+
// lyrics-eng, or lyrics-<description>-eng: the language is the last part.
|
|
64
|
+
const last = name.slice("lyrics-".length).split(/[-_]/).pop() ?? "";
|
|
65
|
+
lang = /^[a-z]{3}$/.test(last) ? last : "";
|
|
66
|
+
} else {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const text = cleanLyrics(value);
|
|
70
|
+
if (text === "") continue;
|
|
71
|
+
// The longest wins: a short descriptor-only frame is not the song.
|
|
72
|
+
if (!best || text.length > best.text.length) best = { text, language: language(lang) };
|
|
73
|
+
}
|
|
74
|
+
return best;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
type Fetcher = (url: string, init?: RequestInit) => Promise<Response>;
|
|
78
|
+
|
|
79
|
+
export interface LyricsFinderOptions {
|
|
80
|
+
/** The file's tags (TagReader.read). */
|
|
81
|
+
tags: (file: string) => Promise<Record<string, string>>;
|
|
82
|
+
/** What the library knows when the file has no tag for it. */
|
|
83
|
+
known?: (file: string) => { title: string; artist: string } | null;
|
|
84
|
+
/** nichedb's address; NIXAMP_LYRICS_URL, else nichedb.dev. "" turns the lookup off. */
|
|
85
|
+
base?: string;
|
|
86
|
+
fetcher?: Fetcher;
|
|
87
|
+
/** How long nichedb's answer (or its silence) is kept. */
|
|
88
|
+
ttlMs?: number;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
now?: () => number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Finds a file's words, from its tags, else from nichedb. */
|
|
94
|
+
export class LyricsFinder {
|
|
95
|
+
private remote = new Map<string, { at: number; lyrics: Lyrics | null }>();
|
|
96
|
+
private asking = new Map<string, Promise<Lyrics | null>>();
|
|
97
|
+
private readonly base: string;
|
|
98
|
+
private readonly fetcher: Fetcher;
|
|
99
|
+
private readonly ttl: number;
|
|
100
|
+
private readonly timeout: number;
|
|
101
|
+
private readonly now: () => number;
|
|
102
|
+
|
|
103
|
+
constructor(private readonly options: LyricsFinderOptions) {
|
|
104
|
+
this.base = (options.base ?? process.env["NIXAMP_LYRICS_URL"] ?? NICHEDB_LYRICS).replace(/\/+$/, "");
|
|
105
|
+
this.fetcher = options.fetcher ?? ((url, init) => fetch(url, init));
|
|
106
|
+
this.ttl = options.ttlMs ?? 10 * 60_000;
|
|
107
|
+
this.timeout = options.timeoutMs ?? 4_000;
|
|
108
|
+
this.now = options.now ?? Date.now;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** The file's words, or null. Never throws; never waits on nichedb longer than the timeout. */
|
|
112
|
+
async find(file: string): Promise<Lyrics | null> {
|
|
113
|
+
let tags: Record<string, string> = {};
|
|
114
|
+
try { tags = await this.options.tags(file); } catch { tags = {}; }
|
|
115
|
+
const known = this.options.known?.(file) ?? null;
|
|
116
|
+
const title = tags["title"] || known?.title || "";
|
|
117
|
+
const artist = tags["artist"] || tags["album_artist"] || known?.artist || "";
|
|
118
|
+
const own = lyricsFromTags(tags);
|
|
119
|
+
if (own) return { title, artist, text: own.text, source: "embedded", language: own.language };
|
|
120
|
+
if (!title || !artist || !this.base) return null;
|
|
121
|
+
return this.lookup(artist, title);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** What nichedb has for this artist and title, kept for ten minutes. */
|
|
125
|
+
lookup(artist: string, title: string): Promise<Lyrics | null> {
|
|
126
|
+
const key = `${artist.toLowerCase()}\n${title.toLowerCase()}`;
|
|
127
|
+
const hit = this.remote.get(key);
|
|
128
|
+
if (hit && this.now() - hit.at < this.ttl) return Promise.resolve(hit.lyrics);
|
|
129
|
+
const pending = this.asking.get(key);
|
|
130
|
+
if (pending) return pending;
|
|
131
|
+
const asked = this.ask(artist, title).then((lyrics) => {
|
|
132
|
+
if (this.remote.size > 2000) this.remote.clear();
|
|
133
|
+
this.remote.set(key, { at: this.now(), lyrics });
|
|
134
|
+
return lyrics;
|
|
135
|
+
}).finally(() => this.asking.delete(key));
|
|
136
|
+
this.asking.set(key, asked);
|
|
137
|
+
return asked;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private async ask(artist: string, title: string): Promise<Lyrics | null> {
|
|
141
|
+
const url = `${this.base}/api/v1/lyrics?artist=${encodeURIComponent(artist)}&title=${encodeURIComponent(title)}`;
|
|
142
|
+
try {
|
|
143
|
+
const response = await this.fetcher(url, { headers: { accept: "application/json" }, signal: AbortSignal.timeout(this.timeout) });
|
|
144
|
+
if (!response.ok) return null;
|
|
145
|
+
const body = await response.json() as { lyrics?: Record<string, unknown> };
|
|
146
|
+
const found = body?.lyrics;
|
|
147
|
+
const text = typeof found?.["text"] === "string" ? cleanLyrics(found["text"]) : "";
|
|
148
|
+
if (!text) return null;
|
|
149
|
+
const string = (name: string): string => (typeof found?.[name] === "string" ? String(found[name]) : "");
|
|
150
|
+
return {
|
|
151
|
+
title: string("title") || title,
|
|
152
|
+
artist: string("artist") || artist,
|
|
153
|
+
text,
|
|
154
|
+
source: "nichedb",
|
|
155
|
+
language: string("language"),
|
|
156
|
+
};
|
|
157
|
+
} catch {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
package/src/server.ts
CHANGED
|
@@ -82,6 +82,9 @@ import { AiRadio } from "./ai-radio.ts";
|
|
|
82
82
|
import { ListenerShares } from "./listener-shares.ts";
|
|
83
83
|
import { HolderStore, TagReader, factsFor } from "./track-facts.ts";
|
|
84
84
|
import { SUPPORT_CSP, SUPPORT_PAGE, Support, SupportError, SupportSubscriptions, supportHoldersFrom } from "./support.ts";
|
|
85
|
+
import { LyricsFinder } from "./lyrics.ts";
|
|
86
|
+
import { LyricsPublisher } from "./lyrics-publish.ts";
|
|
87
|
+
import { aiKey } from "./ai-keys.ts";
|
|
85
88
|
import { STATION_APP_CSP, STATION_PAGE, STATION_PAGE_CSP, STATION_PAGE_HTML } from "./station-page.ts";
|
|
86
89
|
import { GUIDE_CSP, guideHosts, guidePeers, peerBase, PeerGuides, renderGuide, type GuideEntry } from "./station-guide.ts";
|
|
87
90
|
import { StationRunner } from "./station-runner.ts";
|
|
@@ -1742,6 +1745,10 @@ export interface HandlerOptions {
|
|
|
1742
1745
|
facts?: (station: Station, file: string) => Promise<import("./track-facts.ts").TrackFacts>;
|
|
1743
1746
|
/** The cover picture inside a file, for the now-playing card. */
|
|
1744
1747
|
cover?: (file: string) => Promise<{ bytes: Buffer; type: string } | null>;
|
|
1748
|
+
/** The words of a file on the air, from its tags or nichedb. */
|
|
1749
|
+
lyrics?: (station: Station, file: string) => Promise<import("./lyrics.ts").Lyrics | null>;
|
|
1750
|
+
/** Our own songs' words, published back to nichedb. */
|
|
1751
|
+
lyricsPublisher?: import("./lyrics-publish.ts").LyricsPublisher;
|
|
1745
1752
|
/** Copyright holders, matched to tracks by artist or station. */
|
|
1746
1753
|
holders?: import("./track-facts.ts").HolderStore;
|
|
1747
1754
|
/** Proxies (by address) whose X-Forwarded-For is believed, for per-sharer limits. */
|
|
@@ -2998,6 +3005,8 @@ export function createHandler(engine: Engine, options: HandlerOptions) {
|
|
|
2998
3005
|
...(options.stations.auto ? { auto: options.stations.auto } : {}),
|
|
2999
3006
|
...(options.stations.facts ? { facts: options.stations.facts } : {}),
|
|
3000
3007
|
...(options.stations.cover ? { cover: options.stations.cover } : {}),
|
|
3008
|
+
...(options.stations.lyrics ? { lyrics: options.stations.lyrics } : {}),
|
|
3009
|
+
...(options.stations.lyricsPublisher ? { lyricsPublisher: options.stations.lyricsPublisher } : {}),
|
|
3001
3010
|
...(options.stations.peers ? { peers: () => options.stations!.peers!.entries() } : {}),
|
|
3002
3011
|
throttle: () => {
|
|
3003
3012
|
const verdict = guard.check(`stations:${control.account || callerOf(request.headers, request.socket.remoteAddress, behindProxy)}`, STATION_CONTROL_LIMIT);
|
|
@@ -7106,6 +7115,27 @@ export async function serve(argv: string[], version = "0.1.0"): Promise<void> {
|
|
|
7106
7115
|
covers.set(file, { key, picture });
|
|
7107
7116
|
return picture;
|
|
7108
7117
|
};
|
|
7118
|
+
// The words of what is on: the file's own tag, else nichedb.dev's.
|
|
7119
|
+
const lyricsFinder = new LyricsFinder({ tags: (file) => tagReader.read(file), known: (file) => trackFor(engine, file) });
|
|
7120
|
+
stations.lyrics = (_station, file) => lyricsFinder.find(file);
|
|
7121
|
+
// Our own songs' words, back to nichedb, when a key is set: on any station
|
|
7122
|
+
// change, after a library scan, and once at start.
|
|
7123
|
+
const lyricsPublisher = new LyricsPublisher({
|
|
7124
|
+
file: LyricsPublisher.fileFor(stateDir(), options.port),
|
|
7125
|
+
key: () => aiKey("NIXAMP_LYRICS_KEY"),
|
|
7126
|
+
stations: () => stationStore.list(),
|
|
7127
|
+
tags: (file) => tagReader.read(file),
|
|
7128
|
+
known: (file) => trackFor(engine, file),
|
|
7129
|
+
log: (line) => console.log(line),
|
|
7130
|
+
});
|
|
7131
|
+
stations.lyricsPublisher = lyricsPublisher;
|
|
7132
|
+
stationStore.onSaved = () => lyricsPublisher.soon();
|
|
7133
|
+
const scannedBefore = libraryIndex.onScanned;
|
|
7134
|
+
libraryIndex.onScanned = (report) => {
|
|
7135
|
+
scannedBefore?.(report);
|
|
7136
|
+
lyricsPublisher.soon();
|
|
7137
|
+
};
|
|
7138
|
+
lyricsPublisher.soon();
|
|
7109
7139
|
stations.facts = async (station, file) => {
|
|
7110
7140
|
const share = listenerShares.atFile(file);
|
|
7111
7141
|
const composed = aiRadio.trackAt(file);
|
|
@@ -7113,8 +7143,10 @@ export async function serve(argv: string[], version = "0.1.0"): Promise<void> {
|
|
|
7113
7143
|
let stamp = "";
|
|
7114
7144
|
try { stamp = String(Math.round(statSync(file).mtimeMs)); } catch { stamp = ""; }
|
|
7115
7145
|
const art = picture ? `/api/v1/stations/${station.id}/art?t=${encodeURIComponent(station.listenToken)}&f=${sha("sha1").update(file + stamp).digest("hex").slice(0, 12)}` : "";
|
|
7146
|
+
const words = await lyricsFinder.find(file).catch(() => null);
|
|
7116
7147
|
return factsFor({
|
|
7117
7148
|
art,
|
|
7149
|
+
...(words ? { lyrics: `/api/v1/stations/${station.id}/lyrics?t=${encodeURIComponent(station.listenToken)}&f=${sha("sha1").update(file + stamp).digest("hex").slice(0, 12)}` } : {}),
|
|
7118
7150
|
station, file,
|
|
7119
7151
|
tags: await tagReader.read(file),
|
|
7120
7152
|
known: trackFor(engine, file),
|
package/src/station-cli.ts
CHANGED
|
@@ -253,6 +253,8 @@ export async function station(argv: string[]): Promise<number> {
|
|
|
253
253
|
return await aiCommand(argv.slice(1), call, show, json);
|
|
254
254
|
case "shares":
|
|
255
255
|
return await sharesCommand(argv.slice(1), call, show);
|
|
256
|
+
case "lyrics":
|
|
257
|
+
return await lyricsCommand(argv.slice(1), call, show, json);
|
|
256
258
|
case "holder":
|
|
257
259
|
case "holders": {
|
|
258
260
|
const sub = argv[1] ?? "list";
|
|
@@ -389,6 +391,44 @@ async function aiCommand(argv: string[], call: Call, show: Show, json: boolean):
|
|
|
389
391
|
}
|
|
390
392
|
}
|
|
391
393
|
|
|
394
|
+
/** `nixamp station lyrics ...`: our own songs' words, published back to nichedb.dev. */
|
|
395
|
+
async function lyricsCommand(argv: string[], call: Call, show: Show, json: boolean): Promise<number> {
|
|
396
|
+
const [sub, id] = argv;
|
|
397
|
+
switch (sub) {
|
|
398
|
+
case undefined:
|
|
399
|
+
case "status":
|
|
400
|
+
return show(await call("GET", "/api/v1/stations/lyrics"), (body) => {
|
|
401
|
+
const stations = (body["stations"] as Record<string, unknown>[] | undefined) ?? [];
|
|
402
|
+
const last = body["last"] as { at: number; reports: Array<Record<string, unknown>> } | null;
|
|
403
|
+
return [
|
|
404
|
+
`key ${body["key"] ? "set" : "- (nixamp station lyrics key, the value on stdin)"}`,
|
|
405
|
+
`target ${String(body["target"])}`,
|
|
406
|
+
`published ${String(body["published"])} files${body["running"] ? "; publishing now" : ""}`,
|
|
407
|
+
...(last ? [`last run ${new Date(last.at).toISOString()}: ${last.reports.map((one) => `${String(one["station"])} +${String(one["published"])}`).join(", ") || "nothing eligible"}`] : []),
|
|
408
|
+
...(body["lastError"] ? [`problem ${String(body["lastError"])}`] : []),
|
|
409
|
+
"",
|
|
410
|
+
...stations.map((one) => ` ${String(one["id"])} ${one["eligible"] ? "publishes" : "no "} ${String(one["published"]).padStart(4)}/${String(one["files"]).padEnd(5)} ${String(one["name"])}${one["eligible"] ? "" : ` (${String(one["why"])})`}`),
|
|
411
|
+
].join("\n");
|
|
412
|
+
});
|
|
413
|
+
case "publish": {
|
|
414
|
+
if (!id || id.startsWith("--")) { console.error("nixamp station lyrics publish needs a station id"); return 2; }
|
|
415
|
+
if (!json) console.log("Publishing; a second between songs…");
|
|
416
|
+
return show(await call("POST", `/api/v1/stations/lyrics/${id}/publish`, {}), (body) => {
|
|
417
|
+
const report = body["report"] as Record<string, unknown>;
|
|
418
|
+
return `${String(report["published"])} published, ${String(report["unchanged"])} already there, ${String(report["without"])} without words, ${String(report["failed"])} failed${report["stopped"] ? `\nstopped: ${String(report["stopped"])}` : ""}`;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
case "key": {
|
|
422
|
+
const value = argv.includes("--clear") ? "" : await readStdin();
|
|
423
|
+
return show(await call("POST", "/api/v1/stations/ai/keys", { name: "NIXAMP_LYRICS_KEY", value }), (answer) =>
|
|
424
|
+
`nichedb lyrics key ${((answer["keys"] ?? {}) as Record<string, boolean>)["NIXAMP_LYRICS_KEY"] ? "set" : "cleared"}.`);
|
|
425
|
+
}
|
|
426
|
+
default:
|
|
427
|
+
console.error(`nixamp station lyrics: no command "${sub}".\n\n${USAGE}`);
|
|
428
|
+
return 2;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
392
432
|
/** `nixamp station shares ...` */
|
|
393
433
|
async function sharesCommand(argv: string[], call: Call, show: Show): Promise<number> {
|
|
394
434
|
const [sub, id] = argv;
|
package/src/station-page.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { createHash } from "node:crypto";
|
|
|
14
14
|
const STYLE = `
|
|
15
15
|
:root{--bg:#f6f5f2;--fg:#17171a;--muted:#5d5d66;--card:#fff;--line:#dedcd6;--accent:#1f6feb;--live:#0b7a3b;--warn:#9a6700;--off:#8c2f39}
|
|
16
16
|
@media (prefers-color-scheme:dark){:root{--bg:#121214;--fg:#ececf1;--muted:#a4a4b0;--card:#1c1c20;--line:#2c2c33;--accent:#6aa7ff;--live:#3fbf7f;--warn:#e3b341;--off:#f0838f}}
|
|
17
|
-
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
17
|
+
*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
18
18
|
main{max-width:560px;margin:0 auto;padding:48px 16px}
|
|
19
19
|
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:24px}
|
|
20
20
|
h1{font-size:1.6rem;line-height:1.2;margin:0 0 4px}
|
|
@@ -30,6 +30,13 @@ button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(-
|
|
|
30
30
|
label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.9rem}
|
|
31
31
|
input[type=range]{width:120px;accent-color:var(--accent)}
|
|
32
32
|
.small{margin-top:20px;font-size:.85rem;color:var(--muted)}.small a{color:inherit}
|
|
33
|
+
.lyrics{margin:20px 0 0;border-top:1px solid var(--line);padding-top:12px}
|
|
34
|
+
.lyrics summary{cursor:pointer;font-weight:600;min-height:24px}
|
|
35
|
+
.lyrics .for{font-weight:400;color:var(--muted);font-size:.9rem}
|
|
36
|
+
.words{margin-top:10px;line-height:1.6}
|
|
37
|
+
.words p{margin:0 0 1em;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
38
|
+
.words p.sec{margin:1.2em 0 .3em;font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
|
|
39
|
+
.words p.sec:first-child{margin-top:0}
|
|
33
40
|
.screen{display:block;width:100%;aspect-ratio:16/9;background:#000;border-radius:10px;margin:12px 0}
|
|
34
41
|
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
35
42
|
@media (prefers-reduced-motion:no-preference){.live::before{animation:pulse 2s ease-in-out infinite}}
|
|
@@ -90,13 +97,37 @@ const SCRIPT = `
|
|
|
90
97
|
if (!wanted || audio.paused || audio.buffered.length === 0) return 0;
|
|
91
98
|
return Math.max(0, Math.min(30, audio.buffered.end(audio.buffered.length - 1) - audio.currentTime));
|
|
92
99
|
};
|
|
100
|
+
// The words of what is on, line by line; "[Verse 1]" as a small header. Text only, never HTML.
|
|
101
|
+
let words = null;
|
|
102
|
+
const lyrics = async () => {
|
|
103
|
+
try {
|
|
104
|
+
const r = await fetch(api + "/lyrics" + q, { cache: "no-store" });
|
|
105
|
+
const got = r.ok ? (await r.json()).lyrics : null;
|
|
106
|
+
const key = got ? got.title + "\\n" + got.text : "";
|
|
107
|
+
if (key === words) return;
|
|
108
|
+
words = key;
|
|
109
|
+
$("#lyrics").hidden = !got;
|
|
110
|
+
if (!got) return;
|
|
111
|
+
const out = [];
|
|
112
|
+
let stanza = [];
|
|
113
|
+
const flush = () => { if (stanza.length) { const p = document.createElement("p"); p.textContent = stanza.join("\\n"); out.push(p); stanza = []; } };
|
|
114
|
+
for (const line of got.text.split("\\n")) {
|
|
115
|
+
if (/^\\s*\\[[^\\]]{1,160}\\]\\s*$/.test(line)) { flush(); const h = document.createElement("p"); h.className = "sec"; h.textContent = line.trim().slice(1, -1); out.push(h); }
|
|
116
|
+
else if (line.trim() === "") flush();
|
|
117
|
+
else stanza.push(line);
|
|
118
|
+
}
|
|
119
|
+
flush();
|
|
120
|
+
$("#words").replaceChildren(...out);
|
|
121
|
+
$("#lyrics-for").textContent = got.title ? " · " + got.title : "";
|
|
122
|
+
} catch {}
|
|
123
|
+
};
|
|
93
124
|
const listen = () => {
|
|
94
125
|
if (!window.EventSource) return;
|
|
95
126
|
const events = new EventSource(api + "/events" + q);
|
|
96
|
-
events.addEventListener("hello", (e) => { live = true; title(JSON.parse(e.data)); });
|
|
127
|
+
events.addEventListener("hello", (e) => { live = true; title(JSON.parse(e.data)); lyrics(); });
|
|
97
128
|
events.addEventListener("now", (e) => {
|
|
98
129
|
const s = JSON.parse(e.data);
|
|
99
|
-
setTimeout(() => { title(s); say(s.nowPlaying ? "Now playing " + (s.nowPlaying.title || "") : ""); }, ahead() * 1000);
|
|
130
|
+
setTimeout(() => { title(s); lyrics(); say(s.nowPlaying ? "Now playing " + (s.nowPlaying.title || "") : ""); }, ahead() * 1000);
|
|
100
131
|
});
|
|
101
132
|
events.addEventListener("state", () => poll());
|
|
102
133
|
events.onerror = () => { live = false; };
|
|
@@ -122,7 +153,9 @@ const SCRIPT = `
|
|
|
122
153
|
wire();
|
|
123
154
|
$("#play").addEventListener("click", () => { if (wanted) { stop(); say("Stopped"); } else { wanted = true; retry = 0; button(); join(); say("Playing"); } });
|
|
124
155
|
$("#volume").addEventListener("input", (e) => { audio.volume = Number(e.target.value); });
|
|
156
|
+
if (window.matchMedia && matchMedia("(max-width: 640px)").matches) $("#lyrics-box").open = false;
|
|
125
157
|
poll();
|
|
158
|
+
lyrics();
|
|
126
159
|
listen();
|
|
127
160
|
setInterval(poll, 5000);
|
|
128
161
|
})();
|
|
@@ -152,6 +185,9 @@ const PAGE = `<!doctype html>
|
|
|
152
185
|
<button id="play" type="button" aria-pressed="false" disabled>Play</button>
|
|
153
186
|
<label>Volume <input id="volume" type="range" min="0" max="1" step="0.05" value="1"></label>
|
|
154
187
|
</div>
|
|
188
|
+
<section id="lyrics" class="lyrics" aria-label="Lyrics" hidden>
|
|
189
|
+
<details id="lyrics-box" open><summary>Lyrics<span id="lyrics-for" class="for"></span></summary><div id="words" class="words"></div></details>
|
|
190
|
+
</section>
|
|
155
191
|
<p class="small"><a id="m3u" href="#">Open in another player (.m3u)</a> · Pausing here does not pause the station.</p>
|
|
156
192
|
</div>
|
|
157
193
|
<p class="small">Played by <a href="https://nixamp.com">nixamp</a>.</p>
|
package/src/station-routes.ts
CHANGED
|
@@ -17,12 +17,14 @@ import type { Channels } from "./channels.ts";
|
|
|
17
17
|
import type { StationRunner } from "./station-runner.ts";
|
|
18
18
|
import { alertsFor, type Limits, type StationUsage } from "./station-metering.ts";
|
|
19
19
|
import { aiFromTags, type TrackFacts } from "./track-facts.ts";
|
|
20
|
+
import type { Lyrics } from "./lyrics.ts";
|
|
21
|
+
import type { PublishReport } from "./lyrics-publish.ts";
|
|
20
22
|
import {
|
|
21
23
|
StationError, channelOf, tokensMatch, type OwnerStation, type PublicStation, type Station, type StationStore,
|
|
22
24
|
} from "./stations.ts";
|
|
23
25
|
|
|
24
26
|
/** The three things a station's link opens. */
|
|
25
|
-
const LISTEN = /^\/api\/v1\/stations\/([a-z0-9]{10})\/(stream|state|listen\.m3u|events|now|art)$/;
|
|
27
|
+
const LISTEN = /^\/api\/v1\/stations\/([a-z0-9]{10})\/(stream|state|listen\.m3u|events|now|art|lyrics)$/;
|
|
26
28
|
|
|
27
29
|
/** Whether this path is one a station's own link may open, without the server's key. */
|
|
28
30
|
export function isStationListenPath(path: string): boolean {
|
|
@@ -64,6 +66,10 @@ export interface StationContext {
|
|
|
64
66
|
facts?: (station: Station, file: string) => Promise<TrackFacts>;
|
|
65
67
|
/** The cover picture inside a file (JPEG/PNG bytes), or null. */
|
|
66
68
|
cover?: (file: string) => Promise<{ bytes: Buffer; type: string } | null>;
|
|
69
|
+
/** The words of a file, from its tags or nichedb; null when none are known. */
|
|
70
|
+
lyrics?: (station: Station, file: string) => Promise<Lyrics | null>;
|
|
71
|
+
/** Our own songs' words, published back to nichedb (lyrics-publish.ts). */
|
|
72
|
+
lyricsPublisher?: { status: () => unknown; publish: (station: Station) => Promise<PublishReport> };
|
|
67
73
|
/** Auto stations: run a sync with these settings (and keep them), or read them. */
|
|
68
74
|
auto?: { sync: (input: Record<string, unknown>) => Promise<unknown>; setting: () => unknown };
|
|
69
75
|
/** The public stations other servers list (guide peers); absent when there are none. */
|
|
@@ -272,6 +278,16 @@ export async function handleStations(
|
|
|
272
278
|
response.end(method === "HEAD" ? undefined : picture.bytes);
|
|
273
279
|
return true;
|
|
274
280
|
}
|
|
281
|
+
if (what === "lyrics") {
|
|
282
|
+
const file = ctx.runner.observed(station.id) === "live" || ctx.runner.observed(station.id) === "recovering" ? nowPlayingFile(ctx, station) : "";
|
|
283
|
+
const lyrics = file && ctx.lyrics ? await ctx.lyrics(station, file).catch(() => null) : null;
|
|
284
|
+
if (!lyrics) {
|
|
285
|
+
ctx.json(response, 404, { error: "no lyrics for what is playing", code: "not_found" });
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
ctx.json(response, 200, { lyrics: { title: lyrics.title, artist: lyrics.artist, text: lyrics.text, source: lyrics.source, language: lyrics.language } });
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
275
291
|
if (what === "now") {
|
|
276
292
|
const file = ctx.runner.observed(station.id) === "live" || ctx.runner.observed(station.id) === "recovering" ? nowPlayingFile(ctx, station) : "";
|
|
277
293
|
ctx.json(response, 200, { station: station.id, facts: file && ctx.facts ? await ctx.facts(station, file).catch(() => null) : null });
|
|
@@ -419,6 +435,35 @@ export async function handleStations(
|
|
|
419
435
|
return true;
|
|
420
436
|
}
|
|
421
437
|
|
|
438
|
+
if (path === "/api/v1/stations/lyrics") {
|
|
439
|
+
if (!ctx.lyricsPublisher) {
|
|
440
|
+
ctx.json(response, 404, { error: "lyrics publishing is not available here", code: "not_found" });
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
if (method !== "GET") {
|
|
444
|
+
ctx.json(response, 405, { error: "GET", code: "method_not_allowed" });
|
|
445
|
+
return true;
|
|
446
|
+
}
|
|
447
|
+
ctx.json(response, 200, ctx.lyricsPublisher.status());
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
const publishLyrics = /^\/api\/v1\/stations\/lyrics\/([a-z0-9]{10})\/publish$/.exec(path);
|
|
451
|
+
if (publishLyrics) {
|
|
452
|
+
const target = ctx.store.get(publishLyrics[1]!);
|
|
453
|
+
if (!ctx.lyricsPublisher || !target) {
|
|
454
|
+
ctx.json(response, 404, { error: "no such station", code: "not_found" });
|
|
455
|
+
return true;
|
|
456
|
+
}
|
|
457
|
+
if (method !== "POST") {
|
|
458
|
+
ctx.json(response, 405, { error: "POST", code: "method_not_allowed" });
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
const report = await ctx.lyricsPublisher.publish(target);
|
|
462
|
+
const refused = report.stopped.startsWith("not published") ? "not_eligible" : report.stopped.startsWith("no key") ? "no_key" : "";
|
|
463
|
+
ctx.json(response, refused ? 409 : 200, refused ? { error: report.stopped, code: refused, report } : { report });
|
|
464
|
+
return true;
|
|
465
|
+
}
|
|
466
|
+
|
|
422
467
|
const match = /^\/api\/v1\/stations\/([a-z0-9]{10})(?:\/([a-z-]+))?$/.exec(path);
|
|
423
468
|
if (!match) {
|
|
424
469
|
ctx.json(response, 404, { error: "no such station", code: "not_found" });
|
package/src/station-usage.ts
CHANGED
|
@@ -41,6 +41,11 @@ export const USAGE = `nixamp station — make a collection into a station
|
|
|
41
41
|
nixamp station shares approve|reject|delete SHARE
|
|
42
42
|
nixamp station shares trust ADDRESS [--remove] believe this proxy's X-Forwarded-For
|
|
43
43
|
|
|
44
|
+
Lyrics (shown on the station page from each file's own tag, else nichedb.dev; ours published back):
|
|
45
|
+
nixamp station lyrics the key, what was published, which stations may publish
|
|
46
|
+
nixamp station lyrics publish ID publish a station's words now (public, listed, basis owned only)
|
|
47
|
+
nixamp station lyrics key nichedb's key (NIXAMP_LYRICS_KEY), from stdin (--clear forgets it)
|
|
48
|
+
|
|
44
49
|
Copyright holders (the now-playing card: who holds a track's copyright, and how to support them):
|
|
45
50
|
nixamp station holder list
|
|
46
51
|
nixamp station holder set NAME [--artist ARTIST]... [--station ID]... [--support https://...] [--label Subscribe] [--license TEXT]
|
package/src/stations.ts
CHANGED
|
@@ -192,8 +192,12 @@ export class StationStore {
|
|
|
192
192
|
return join(stateDir, `stations-${port}.json`);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
/** Told after every change is written (lyrics publishing listens). */
|
|
196
|
+
onSaved: (() => void) | null = null;
|
|
197
|
+
|
|
195
198
|
private save(): void {
|
|
196
199
|
this.io.write(this.file, `${JSON.stringify({ version: 1, stations: [...this.stations.values()] }, null, 2)}\n`);
|
|
200
|
+
try { this.onSaved?.(); } catch { /* a listener's trouble is not the store's */ }
|
|
197
201
|
}
|
|
198
202
|
|
|
199
203
|
list(): Station[] {
|
package/src/track-facts.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface TrackFacts {
|
|
|
29
29
|
support: { holder: string; url: string; label: string } | null;
|
|
30
30
|
/** The track's own cover, on this station's link (it changes with the track); "" when it has none. */
|
|
31
31
|
art: string;
|
|
32
|
+
/** Where the track's words are, on this station's link; "" when none are known. */
|
|
33
|
+
lyrics: string;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export interface Holder {
|
|
@@ -82,7 +84,12 @@ export class TagReader {
|
|
|
82
84
|
try {
|
|
83
85
|
const parsed = JSON.parse(out) as { format?: { tags?: Record<string, unknown> }; streams?: Array<{ tags?: Record<string, unknown> }> };
|
|
84
86
|
for (const source of [...(parsed.streams ?? []).map((one) => one.tags ?? {}), parsed.format?.tags ?? {}]) {
|
|
85
|
-
for (const [name, value] of Object.entries(source))
|
|
87
|
+
for (const [name, value] of Object.entries(source)) {
|
|
88
|
+
if (typeof value !== "string") continue;
|
|
89
|
+
const lower = name.toLowerCase();
|
|
90
|
+
// A song's words run longer than any other tag (lyrics.ts).
|
|
91
|
+
tags[lower] = value.slice(0, /lyrics/.test(lower) ? 20_000 : 2000);
|
|
92
|
+
}
|
|
86
93
|
}
|
|
87
94
|
} catch {
|
|
88
95
|
// No tags is an answer too.
|
|
@@ -140,6 +147,8 @@ export interface FactSources {
|
|
|
140
147
|
aiTrack?: { made: string } | null;
|
|
141
148
|
/** Where its cover is served, when it has one. */
|
|
142
149
|
art?: string;
|
|
150
|
+
/** Where its words are served, when it has them. */
|
|
151
|
+
lyrics?: string;
|
|
143
152
|
}
|
|
144
153
|
|
|
145
154
|
export function factsFor(input: FactSources): TrackFacts {
|
|
@@ -176,7 +185,7 @@ export function factsFor(input: FactSources): TrackFacts {
|
|
|
176
185
|
rights = { holder: "", basis: "", note: "", license: "", source: "" };
|
|
177
186
|
}
|
|
178
187
|
const support = holder && holder.support ? { holder: holder.name, url: holder.support, label: holder.label || "Support" } : null;
|
|
179
|
-
return { title, artist, album, year, genre, ai, rights, support, art: input.art ?? "" };
|
|
188
|
+
return { title, artist, album, year, genre, ai, rights, support, art: input.art ?? "", lyrics: input.lyrics ?? "" };
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
function slug(text: string): string {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-Dpj3oiHi.js";var t={...e,"No parties live right now.":`لا توجد جلسات مباشرة الآن.`,"Could not refresh parties.":`تعذر تحديث الجلسات.`,"Pick a server in the directory, or paste its link here.":`اختر خادمًا من الدليل أو الصق رابطه هنا.`,"Interface language":`لغة الواجهة`,Language:`اللغة`,"Translation language":`لغة الترجمة`,"Original (auto-detect)":`الأصل (اكتشاف تلقائي)`,Play:`تشغيل`,Pause:`إيقاف مؤقت`,Stop:`إيقاف`,Next:`التالي`,Previous:`السابق`,Select:`اختيار`,"Next/Prev":`التالي/السابق`,Quit:`خروج`,"Now Playing":`قيد التشغيل`,"Spectrum Analyser":`محلل الطيف`,Playlist:`قائمة التشغيل`,Files:`الملفات`,"Open files":`فتح ملفات`,"Open folder":`فتح مجلد`,"Add to library":`إضافة إلى المكتبة`,"Replace playlist":`استبدال قائمة التشغيل`,Filter:`تصفية`,Search:`بحث`,"Nothing loaded.":`لم يُحمّل أي محتوى.`,"Empty.":`فارغ.`,"Loading…":`جارٍ التحميل…`,"Connecting…":`جارٍ الاتصال…`,Connected:`متصل`,"Not connected":`غير متصل`,"No source":`لا يوجد مصدر`,Playing:`يعمل`,Stopped:`متوقف`,Volume:`مستوى الصوت`,Seek:`موضع التشغيل`,"Full screen":`ملء الشاشة`,Download:`تنزيل`,Share:`مشاركة`,Copy:`نسخ`,"Copy link":`نسخ الرابط`,Copied:`تم النسخ`,Save:`حفظ`,Cancel:`إلغاء`,Close:`إغلاق`,Remove:`إزالة`,Delete:`حذف`,Edit:`تعديل`,Add:`إضافة`,Send:`إرسال`,Retry:`إعادة المحاولة`,Back:`رجوع`,"Next page":`الصفحة التالية`,"Previous page":`الصفحة السابقة`,"Show more":`عرض المزيد`,Panels:`اللوحات`,"Reset layout":`إعادة ضبط التخطيط`,Show:`إظهار`,Hide:`إخفاء`,Collapse:`طي`,Expand:`توسيع`,"Move up":`نقل لأعلى`,"Move down":`نقل لأسفل`,Install:`تثبيت`,"TV mode":`وضع التلفاز`,On:`مفعّل`,Off:`معطّل`,Account:`الحساب`,"Sign in":`تسجيل الدخول`,"Sign out":`تسجيل الخروج`,"Create account":`إنشاء حساب`,Email:`البريد الإلكتروني`,Password:`كلمة المرور`,"Forgot password?":`نسيت كلمة المرور؟`,"Welcome back":`مرحبًا بعودتك`,Profile:`الملف الشخصي`,Handle:`اسم المستخدم`,"Your servers":`خوادمك`,Server:`الخادم`,Connect:`اتصال`,Disconnect:`قطع الاتصال`,Directory:`الدليل`,Favourites:`المفضلة`,Follow:`متابعة`,Unfollow:`إلغاء المتابعة`,Notifications:`الإشعارات`,"Phone number":`رقم الهاتف`,"Save number":`حفظ الرقم`,Transcript:`النص المفرغ`,Captions:`الترجمة النصية`,"Translate audio":`ترجمة الصوت`,"Audio language":`لغة الصوت`,"Audio options":`خيارات الصوت`,"Keep background sound":`الاحتفاظ بأصوات الخلفية`,"Background level":`مستوى صوت الخلفية`,"Speaker voices":`أصوات المتحدثين`,"Any voice":`أي صوت`,"Male voice":`صوت رجالي`,"Female voice":`صوت نسائي`,"Original audio.":`الصوت الأصلي.`,"Buy translated audio":`شراء الصوت المترجم`,"Audio credit":`رصيد الصوت`,"Buy pass":`شراء تصريح`,Pass:`تصريح`,"Pay with":`الدفع باستخدام`,"Check payment":`التحقق من الدفع`,"Open checkout":`الانتقال للدفع`,"Free sessions":`جلسات مجانية`,"Usage rates and expiry":`الأسعار ومدة الصلاحية`,Catalogs:`الكتالوجات`,"Add catalog":`إضافة كتالوج`,"Catalog name":`اسم الكتالوج`,Link:`الرابط`,"Play link":`تشغيل الرابط`,"Go live":`بدء بث مباشر`,Publish:`نشر`,Listen:`استماع`,"Live now":`مباشر الآن`,Upcoming:`قريبًا`,Parties:`حفلات المشاهدة`,"Join party":`الانضمام للحفلة`,"Invite code":`رمز الدعوة`,Invite:`دعوة`,Chat:`الدردشة`,"Chat message":`رسالة دردشة`,People:`الأشخاص`,Speaker:`متحدث`,Speakers:`المتحدثون`,Listener:`مستمع`,Moderator:`مشرف`,"Raise hand":`رفع اليد`,"Hand raises":`الأيدي المرفوعة`,Questions:`الأسئلة`,Resources:`الموارد`,Replay:`إعادة العرض`,Schedule:`الجدول`,Event:`الفعالية`,Host:`المضيف`,About:`حول`,Stage:`المنصة`,Title:`العنوان`,Description:`الوصف`,Topic:`الموضوع`,Public:`عام`,"Anyone with the link":`أي شخص لديه الرابط`,"Invited people":`الأشخاص المدعوون`,"Who can join":`من يمكنه الانضمام`,"Date and time":`التاريخ والوقت`,"Expected length":`المدة المتوقعة`,Repeat:`تكرار`,"Does not repeat":`لا يتكرر`,"Every day":`كل يوم`,"Every week":`كل أسبوع`,Homepage:`الموقع الإلكتروني`,"Host name":`اسم المضيف`,"Profile photo URL":`رابط صورة الملف الشخصي`,"Broadcast link":`رابط البث`,"Edit event":`تعديل الفعالية`,"Save changes":`حفظ التغييرات`,"Create live":`إنشاء بث مباشر`,"Schedule class":`جدولة درس`,"Start class":`بدء الدرس`,"End event":`إنهاء الفعالية`,"End session":`إنهاء الجلسة`,"Session ended":`انتهت الجلسة`,"Event ended":`انتهت الفعالية`,Cancelled:`ملغاة`,"Replay available":`إعادة العرض متاحة`,Join:`انضمام`,"Create invite":`إنشاء دعوة`,"Invite as":`الدعوة بصفة`,"Watch now":`شاهد الآن`,"Start a room":`إنشاء غرفة`,"Recent replays":`إعادات العرض الأخيرة`,"Your account":`حسابك`,"Write with AI":`الكتابة بالذكاء الاصطناعي`,"Suggested title":`العنوان المقترح`,"Suggested description":`الوصف المقترح`,"Suggested topic":`الموضوع المقترح`,"Use these details":`استخدام هذه التفاصيل`,"Learn something live.":`تعلّم شيئًا مباشرة.`,"Screen share":`مشاركة الشاشة`,"Upload and broadcast":`رفع وبث`,Help:`مساعدة`,"Reload Player":`إعادة تحميل المشغل`,"Copy Bundled CLI Path":`نسخ مسار أداة سطر الأوامر المضمنة`,"Developer tools":`أدوات المطور`,Undo:`تراجع`,Redo:`إعادة`,Cut:`قص`,Paste:`لصق`,"Select all":`تحديد الكل`,Status:`الحالة`,"Activity log":`سجل النشاط`,Admin:`الإدارة`,"Playback controls":`عناصر التحكم بالتشغيل`,"Tracks and folders":`المقاطع والمجلدات`,"Original-language captions.":`ترجمة نصية باللغة الأصلية.`,"Skip to playback controls":`الانتقال إلى عناصر التحكم بالتشغيل`,"Skip to playlist":`الانتقال إلى قائمة التشغيل`,"Skip to transcript and translated audio":`الانتقال إلى النص المفرغ والصوت المترجم`};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-Dpj3oiHi.js";var t={...e,"No parties live right now.":`Právě neprobíhají žádné párty.`,"Could not refresh parties.":`Párty se nepodařilo aktualizovat.`,"Pick a server in the directory, or paste its link here.":`Vyberte server v seznamu nebo sem vložte jeho odkaz.`,"Interface language":`Jazyk rozhraní`,Language:`Jazyk`,"Translation language":`Jazyk překladu`,"Original (auto-detect)":`Původní (automatické rozpoznání)`,Play:`Přehrát`,Pause:`Pozastavit`,Stop:`Zastavit`,Next:`Další`,Previous:`Předchozí`,Select:`Vybrat`,"Next/Prev":`Další/Předchozí`,Quit:`Ukončit`,"Now Playing":`Právě hraje`,"Spectrum Analyser":`Spektrální analyzátor`,Playlist:`Seznam skladeb`,Files:`Soubory`,"Open files":`Otevřít soubory`,"Open folder":`Otevřít složku`,"Add to library":`Přidat do knihovny`,"Replace playlist":`Nahradit seznam`,Filter:`Filtrovat`,Search:`Hledat`,"Nothing loaded.":`Nic není načteno.`,"Empty.":`Prázdné.`,"Loading…":`Načítání…`,"Connecting…":`Připojování…`,Connected:`Připojeno`,"Not connected":`Nepřipojeno`,"No source":`Žádný zdroj`,Playing:`Přehrávání`,Stopped:`Zastaveno`,Volume:`Hlasitost`,Seek:`Pozice přehrávání`,"Full screen":`Celá obrazovka`,Download:`Stáhnout`,Share:`Sdílet`,Copy:`Kopírovat`,"Copy link":`Kopírovat odkaz`,Copied:`Zkopírováno`,Save:`Uložit`,Cancel:`Zrušit`,Close:`Zavřít`,Remove:`Odebrat`,Delete:`Smazat`,Edit:`Upravit`,Add:`Přidat`,Send:`Odeslat`,Retry:`Zkusit znovu`,Back:`Zpět`,"Next page":`Další stránka`,"Previous page":`Předchozí stránka`,"Show more":`Zobrazit více`,Panels:`Panely`,"Reset layout":`Obnovit rozložení`,Show:`Zobrazit`,Hide:`Skrýt`,Collapse:`Sbalit`,Expand:`Rozbalit`,"Move up":`Nahoru`,"Move down":`Dolů`,Install:`Nainstalovat`,"TV mode":`Režim TV`,On:`Zapnuto`,Off:`Vypnuto`,Account:`Účet`,"Sign in":`Přihlásit se`,"Sign out":`Odhlásit se`,"Create account":`Vytvořit účet`,Email:`E-mail`,Password:`Heslo`,"Forgot password?":`Zapomenuté heslo?`,"Welcome back":`Vítejte zpět`,Profile:`Profil`,Handle:`Uživatelské jméno`,"Your servers":`Vaše servery`,Server:`Server`,Connect:`Připojit`,Disconnect:`Odpojit`,Directory:`Adresář`,Favourites:`Oblíbené`,Follow:`Sledovat`,Unfollow:`Přestat sledovat`,Notifications:`Oznámení`,"Phone number":`Telefonní číslo`,"Save number":`Uložit číslo`,Transcript:`Přepis`,Captions:`Titulky`,"Translate audio":`Překládat zvuk`,"Audio language":`Jazyk zvuku`,"Audio options":`Možnosti zvuku`,"Keep background sound":`Zachovat zvuk na pozadí`,"Background level":`Hlasitost pozadí`,"Speaker voices":`Hlasy mluvčích`,"Any voice":`Libovolný hlas`,"Male voice":`Mužský hlas`,"Female voice":`Ženský hlas`,"Original audio.":`Původní zvuk.`,"Buy translated audio":`Koupit překlad zvuku`,"Audio credit":`Zvukový kredit`,"Buy pass":`Koupit přístup`,Pass:`Přístup`,"Pay with":`Zaplatit pomocí`,"Check payment":`Ověřit platbu`,"Open checkout":`Přejít k platbě`,"Free sessions":`Bezplatné relace`,"Usage rates and expiry":`Ceny a platnost`,Catalogs:`Katalogy`,"Add catalog":`Přidat katalog`,"Catalog name":`Název katalogu`,Link:`Odkaz`,"Play link":`Přehrát odkaz`,"Go live":`Vysílat živě`,Publish:`Zveřejnit`,Listen:`Poslouchat`,"Live now":`Právě živě`,Upcoming:`Připravované`,Parties:`Společná sledování`,"Join party":`Připojit se ke sledování`,"Invite code":`Kód pozvánky`,Invite:`Pozvat`,Chat:`Chat`,"Chat message":`Zpráva chatu`,People:`Lidé`,Speaker:`Mluvčí`,Speakers:`Mluvčí`,Listener:`Posluchač`,Moderator:`Moderátor`,"Raise hand":`Zvednout ruku`,"Hand raises":`Zvednuté ruce`,Questions:`Otázky`,Resources:`Materiály`,Replay:`Záznam`,Schedule:`Rozvrh`,Event:`Událost`,Host:`Pořadatel`,About:`O události`,Stage:`Pódium`,Title:`Název`,Description:`Popis`,Topic:`Téma`,Public:`Veřejné`,"Anyone with the link":`Kdokoli s odkazem`,"Invited people":`Pozvané osoby`,"Who can join":`Kdo se může připojit`,"Date and time":`Datum a čas`,"Expected length":`Očekávaná délka`,Repeat:`Opakovat`,"Does not repeat":`Neopakuje se`,"Every day":`Každý den`,"Every week":`Každý týden`,Homepage:`Webové stránky`,"Host name":`Jméno pořadatele`,"Profile photo URL":`URL profilové fotky`,"Broadcast link":`Odkaz na vysílání`,"Edit event":`Upravit událost`,"Save changes":`Uložit změny`,"Create live":`Vytvořit vysílání`,"Schedule class":`Naplánovat lekci`,"Start class":`Zahájit lekci`,"End event":`Ukončit událost`,"End session":`Ukončit relaci`,"Session ended":`Relace ukončena`,"Event ended":`Událost ukončena`,Cancelled:`Zrušeno`,"Replay available":`Záznam je k dispozici`,Join:`Připojit se`,"Create invite":`Vytvořit pozvánku`,"Invite as":`Pozvat jako`,"Watch now":`Sledovat nyní`,"Start a room":`Vytvořit místnost`,"Recent replays":`Nedávné záznamy`,"Your account":`Váš účet`,"Write with AI":`Psát pomocí AI`,"Suggested title":`Navrhovaný název`,"Suggested description":`Navrhovaný popis`,"Suggested topic":`Navrhované téma`,"Use these details":`Použít tyto údaje`,"Learn something live.":`Učte se naživo.`,"Screen share":`Sdílet obrazovku`,"Upload and broadcast":`Nahrát a vysílat`,Help:`Nápověda`,"Reload Player":`Znovu načíst přehrávač`,"Copy Bundled CLI Path":`Kopírovat cestu k přibalenému CLI`,"Developer tools":`Vývojářské nástroje`,Undo:`Zpět`,Redo:`Znovu`,Cut:`Vyjmout`,Paste:`Vložit`,"Select all":`Vybrat vše`,Status:`Stav`,"Activity log":`Protokol aktivit`,Admin:`Správa`,"Playback controls":`Ovládání přehrávání`,"Tracks and folders":`Skladby a složky`,"Original-language captions.":`Titulky v původním jazyce.`,"Skip to playback controls":`Přejít k ovládání přehrávání`,"Skip to playlist":`Přejít k seznamu skladeb`,"Skip to transcript and translated audio":`Přejít k přepisu a přeloženému zvuku`};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-Dpj3oiHi.js";var t={...e,"No parties live right now.":`Ingen fester er live lige nu.`,"Could not refresh parties.":`Kunne ikke opdatere festerne.`,"Pick a server in the directory, or paste its link here.":`Vælg en server i oversigten, eller indsæt dens link her.`,"Interface language":`Grænsefladesprog`,Language:`Sprog`,"Translation language":`Oversættelsessprog`,"Original (auto-detect)":`Original (automatisk registrering)`,Play:`Afspil`,Pause:`Pause`,Stop:`Stop`,Next:`Næste`,Previous:`Forrige`,Select:`Vælg`,"Next/Prev":`Næste/Forrige`,Quit:`Afslut`,"Now Playing":`Afspilles nu`,"Spectrum Analyser":`Spektrumanalysator`,Playlist:`Afspilningsliste`,Files:`Filer`,"Open files":`Åbn filer`,"Open folder":`Åbn mappe`,"Add to library":`Føj til bibliotek`,"Replace playlist":`Erstat afspilningsliste`,Filter:`Filtrer`,Search:`Søg`,"Nothing loaded.":`Intet indlæst.`,"Empty.":`Tomt.`,"Loading…":`Indlæser…`,"Connecting…":`Forbinder…`,Connected:`Forbundet`,"Not connected":`Ikke forbundet`,"No source":`Ingen kilde`,Playing:`Afspiller`,Stopped:`Stoppet`,Volume:`Lydstyrke`,Seek:`Afspilningsposition`,"Full screen":`Fuld skærm`,Download:`Download`,Share:`Del`,Copy:`Kopiér`,"Copy link":`Kopiér link`,Copied:`Kopieret`,Save:`Gem`,Cancel:`Annuller`,Close:`Luk`,Remove:`Fjern`,Delete:`Slet`,Edit:`Rediger`,Add:`Tilføj`,Send:`Send`,Retry:`Prøv igen`,Back:`Tilbage`,"Next page":`Næste side`,"Previous page":`Forrige side`,"Show more":`Vis flere`,Panels:`Paneler`,"Reset layout":`Nulstil layout`,Show:`Vis`,Hide:`Skjul`,Collapse:`Fold sammen`,Expand:`Fold ud`,"Move up":`Flyt op`,"Move down":`Flyt ned`,Install:`Installer`,"TV mode":`TV-tilstand`,On:`Til`,Off:`Fra`,Account:`Konto`,"Sign in":`Log ind`,"Sign out":`Log ud`,"Create account":`Opret konto`,Email:`E-mail`,Password:`Adgangskode`,"Forgot password?":`Glemt adgangskode?`,"Welcome back":`Velkommen tilbage`,Profile:`Profil`,Handle:`Brugernavn`,"Your servers":`Dine servere`,Server:`Server`,Connect:`Forbind`,Disconnect:`Afbryd`,Directory:`Oversigt`,Favourites:`Favoritter`,Follow:`Følg`,Unfollow:`Følg ikke længere`,Notifications:`Notifikationer`,"Phone number":`Telefonnummer`,"Save number":`Gem nummer`,Transcript:`Transskription`,Captions:`Undertekster`,"Translate audio":`Oversæt lyd`,"Audio language":`Lydsprog`,"Audio options":`Lydindstillinger`,"Keep background sound":`Bevar baggrundslyd`,"Background level":`Baggrundslydstyrke`,"Speaker voices":`Talernes stemmer`,"Any voice":`Vilkårlig stemme`,"Male voice":`Mandlig stemme`,"Female voice":`Kvindelig stemme`,"Original audio.":`Original lyd.`,"Buy translated audio":`Køb oversat lyd`,"Audio credit":`Lydsaldo`,"Buy pass":`Køb adgang`,Pass:`Adgang`,"Pay with":`Betal med`,"Check payment":`Kontrollér betaling`,"Open checkout":`Gå til betaling`,"Free sessions":`Gratis sessioner`,"Usage rates and expiry":`Priser og udløb`,Catalogs:`Kataloger`,"Add catalog":`Tilføj katalog`,"Catalog name":`Katalognavn`,Link:`Link`,"Play link":`Afspil link`,"Go live":`Gå live`,Publish:`Udgiv`,Listen:`Lyt`,"Live now":`Live nu`,Upcoming:`Kommende`,Parties:`Seerfester`,"Join party":`Deltag i festen`,"Invite code":`Invitationskode`,Invite:`Inviter`,Chat:`Chat`,"Chat message":`Chatbesked`,People:`Personer`,Speaker:`Taler`,Speakers:`Talere`,Listener:`Lytter`,Moderator:`Moderator`,"Raise hand":`Ræk hånden op`,"Hand raises":`Oprakte hænder`,Questions:`Spørgsmål`,Resources:`Materialer`,Replay:`Genudsendelse`,Schedule:`Program`,Event:`Begivenhed`,Host:`Vært`,About:`Om`,Stage:`Scene`,Title:`Titel`,Description:`Beskrivelse`,Topic:`Emne`,Public:`Offentlig`,"Anyone with the link":`Alle med linket`,"Invited people":`Inviterede personer`,"Who can join":`Hvem kan deltage`,"Date and time":`Dato og klokkeslæt`,"Expected length":`Forventet varighed`,Repeat:`Gentag`,"Does not repeat":`Gentages ikke`,"Every day":`Hver dag`,"Every week":`Hver uge`,Homepage:`Hjemmeside`,"Host name":`Værtens navn`,"Profile photo URL":`URL til profilbillede`,"Broadcast link":`Udsendelseslink`,"Edit event":`Rediger begivenhed`,"Save changes":`Gem ændringer`,"Create live":`Opret livesending`,"Schedule class":`Planlæg undervisning`,"Start class":`Start undervisning`,"End event":`Afslut begivenhed`,"End session":`Afslut session`,"Session ended":`Session afsluttet`,"Event ended":`Begivenhed afsluttet`,Cancelled:`Annulleret`,"Replay available":`Genudsendelse tilgængelig`,Join:`Deltag`,"Create invite":`Opret invitation`,"Invite as":`Inviter som`,"Watch now":`Se nu`,"Start a room":`Opret et rum`,"Recent replays":`Seneste genudsendelser`,"Your account":`Din konto`,"Write with AI":`Skriv med AI`,"Suggested title":`Foreslået titel`,"Suggested description":`Foreslået beskrivelse`,"Suggested topic":`Foreslået emne`,"Use these details":`Brug disse oplysninger`,"Learn something live.":`Lær noget live.`,"Screen share":`Del skærm`,"Upload and broadcast":`Upload og udsend`,Help:`Hjælp`,"Reload Player":`Genindlæs afspiller`,"Copy Bundled CLI Path":`Kopiér stien til medfølgende CLI`,"Developer tools":`Udviklerværktøjer`,Undo:`Fortryd`,Redo:`Gentag`,Cut:`Klip`,Paste:`Indsæt`,"Select all":`Vælg alle`,Status:`Status`,"Activity log":`Aktivitetslog`,Admin:`Administration`,"Playback controls":`Afspilningskontroller`,"Tracks and folders":`Numre og mapper`,"Original-language captions.":`Undertekster på originalsproget.`,"Skip to playback controls":`Spring til afspilningskontroller`,"Skip to playlist":`Spring til afspilningslisten`,"Skip to transcript and translated audio":`Spring til transskription og oversat lyd`};export{t as default};
|