nixamp 0.36.1 → 0.36.3
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/auto-stations.d.ts +6 -0
- package/dist/auto-stations.js +21 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +25 -4
- package/dist/station-guide.d.ts +17 -1
- package/dist/station-guide.js +23 -1
- package/dist/station-routes.d.ts +12 -1
- package/dist/station-routes.js +11 -7
- package/package.json +1 -1
- package/src/auto-stations.ts +21 -1
- package/src/server.ts +27 -4
- package/src/station-guide.ts +33 -1
- package/src/station-routes.ts +18 -7
- package/web/dist/assets/{ar-D3Jhup9Q.js → ar-BD2UUquk.js} +1 -1
- package/web/dist/assets/{cs-dhVCsOeL.js → cs-BAnlPO0G.js} +1 -1
- package/web/dist/assets/{da-DwfG3DeD.js → da-B3Tu9hTo.js} +1 -1
- package/web/dist/assets/{de-BtBDFO3Q.js → de-BnhC08J6.js} +1 -1
- package/web/dist/assets/{es-Bf-T9sCu.js → es-C6f8XeOz.js} +1 -1
- package/web/dist/assets/{fi-Dp5UyT8g.js → fi-c8nSqL6Y.js} +1 -1
- package/web/dist/assets/{fr-D_usw45L.js → fr-CCQqbzd3.js} +1 -1
- package/web/dist/assets/{hi-DK-QMrPr.js → hi-oWq0nqXG.js} +1 -1
- package/web/dist/assets/{hls-3VKVEQE3-DtHIQi0a.js → hls-3VKVEQE3-D4IS0V1s.js} +1 -1
- package/web/dist/assets/{hu-DB1881vz.js → hu-DXCXa0U6.js} +1 -1
- package/web/dist/assets/{id-DhzgwICo.js → id-i3qTkeDv.js} +1 -1
- package/web/dist/assets/{it-C2_ScULL.js → it-CHb1I7qg.js} +1 -1
- package/web/dist/assets/{main-BYT6Kgoi.js → main-B8hCuIBx.js} +2 -2
- package/web/dist/assets/{mpegts-m4dTmfgt.js → mpegts-DSR-qG9w.js} +1 -1
- package/web/dist/assets/{mpegts-LO6RVLD6-CIaN13nn.js → mpegts-LO6RVLD6-DKSrU2jg.js} +1 -1
- package/web/dist/assets/{nl-BFAcO0yy.js → nl-iCv9pkTl.js} +1 -1
- package/web/dist/assets/{ru-Nbvhzngr.js → ru-BW2-AWx1.js} +1 -1
- package/web/dist/assets/{sv-DEZlQblR.js → sv-DJV6w7__.js} +1 -1
- package/web/dist/assets/{uk-CUhXQE5f.js → uk-CCsBeFUE.js} +1 -1
- package/web/dist/assets/{vi-0uN7oQuT.js → vi-Cckuuziu.js} +1 -1
- package/web/dist/assets/{zh-bsMdPHHB.js → zh-Df6AwSwJ.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/sw.js +22 -22
package/dist/auto-stations.d.ts
CHANGED
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
import type { LibraryIndex } from "./library-index.ts";
|
|
19
19
|
import type { StationRunner } from "./station-runner.ts";
|
|
20
20
|
import type { StationStore } from "./stations.ts";
|
|
21
|
+
/**
|
|
22
|
+
* A film genre as one name, whatever case or spelling nichedb's sources
|
|
23
|
+
* used: "action" and "Action" are one station, and so are "Science Fiction",
|
|
24
|
+
* "Science-Fiction" and "Sci-Fi".
|
|
25
|
+
*/
|
|
26
|
+
export declare function filmGenre(raw: string): string;
|
|
21
27
|
export declare function adultTitle(title: string, genres?: string[]): boolean;
|
|
22
28
|
/** The genres a tag belongs to, recognisably named; [] when it is not music or not known. */
|
|
23
29
|
export declare function genreBuckets(raw: string): string[];
|
package/dist/auto-stations.js
CHANGED
|
@@ -19,6 +19,26 @@ const RULES = [
|
|
|
19
19
|
const NOT_MUSIC = /lecture|interview|audiobook|podcast|speech|spoken|talk|course|sermon|lesson|comedy/i;
|
|
20
20
|
/** Never on a genre TV station, whatever nichedb calls it. */
|
|
21
21
|
const ADULT = /\b(xxx|porn|nsfw|onlyfans|brazzers|blacked|bangbros|milf|hentai|sex|erotic|adult)\b/i;
|
|
22
|
+
/**
|
|
23
|
+
* A film genre as one name, whatever case or spelling nichedb's sources
|
|
24
|
+
* used: "action" and "Action" are one station, and so are "Science Fiction",
|
|
25
|
+
* "Science-Fiction" and "Sci-Fi".
|
|
26
|
+
*/
|
|
27
|
+
export function filmGenre(raw) {
|
|
28
|
+
const word = raw.trim().toLowerCase().replace(/[\s_-]+/g, " ");
|
|
29
|
+
const synonyms = {
|
|
30
|
+
"science fiction": "Sci-Fi", "sci fi": "Sci-Fi", "scifi": "Sci-Fi",
|
|
31
|
+
"documentary": "Documentary", "docu": "Documentary",
|
|
32
|
+
"animation": "Animation", "animated": "Animation", "anime": "Animation",
|
|
33
|
+
"musical": "Music", "music": "Music",
|
|
34
|
+
"kids": "Family", "children": "Family", "family": "Family",
|
|
35
|
+
"war & politics": "War", "war": "War",
|
|
36
|
+
"action & adventure": "Action", "sci fi & fantasy": "Sci-Fi",
|
|
37
|
+
};
|
|
38
|
+
if (synonyms[word])
|
|
39
|
+
return synonyms[word];
|
|
40
|
+
return word.replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
41
|
+
}
|
|
22
42
|
export function adultTitle(title, genres = []) {
|
|
23
43
|
return ADULT.test(title) || genres.some((one) => /adult|erotic|porn/i.test(one));
|
|
24
44
|
}
|
|
@@ -92,7 +112,7 @@ export async function syncAutoStations(deps, options = DEFAULT_AUTO) {
|
|
|
92
112
|
const genres = await deps.filmGenres(title).catch(() => []);
|
|
93
113
|
if (adultTitle(`${title} ${item.rel}`, genres))
|
|
94
114
|
continue;
|
|
95
|
-
for (const genre of genres.slice(0, 2)) {
|
|
115
|
+
for (const genre of [...new Set(genres.map(filmGenre))].slice(0, 2)) {
|
|
96
116
|
const list = tv.get(genre) ?? [];
|
|
97
117
|
list.push(item);
|
|
98
118
|
tv.set(genre, list);
|
package/dist/server.d.ts
CHANGED
|
@@ -589,6 +589,8 @@ export interface HandlerOptions {
|
|
|
589
589
|
sync: (input: Record<string, unknown>) => Promise<unknown>;
|
|
590
590
|
setting: () => unknown;
|
|
591
591
|
};
|
|
592
|
+
/** This server's public https address, once it is known. */
|
|
593
|
+
publicBase?: () => string;
|
|
592
594
|
};
|
|
593
595
|
web: string | null;
|
|
594
596
|
/** Branded clients on this same backend, keyed by an explicitly configured host. */
|
package/dist/server.js
CHANGED
|
@@ -54,14 +54,14 @@ import { ArtCache, coverArtOf, stillFrom } from "./art.js";
|
|
|
54
54
|
import { PartyLine, telnyxSms } from "./partyline.js";
|
|
55
55
|
import { HlsPackagers, segmentType, withKey } from "./hls.js";
|
|
56
56
|
import { refusedDestination } from "./destinations.js";
|
|
57
|
-
import { handleStations, isStationListenPath } from "./station-routes.js";
|
|
57
|
+
import { guideEntries, handleStations, isStationListenPath } from "./station-routes.js";
|
|
58
58
|
import { handleLibrary } from "./library-routes.js";
|
|
59
59
|
import { LibraryIndex, probeItem, trackOf } from "./library-index.js";
|
|
60
60
|
import { ListenerStore } from "./library-user.js";
|
|
61
61
|
import { Importer } from "./handoff.js";
|
|
62
62
|
import { handleHandoffs } from "./handoff-routes.js";
|
|
63
63
|
import { STATION_PAGE, STATION_PAGE_CSP, STATION_PAGE_HTML } from "./station-page.js";
|
|
64
|
-
import { GUIDE_CSP,
|
|
64
|
+
import { GUIDE_CSP, guideHosts, renderGuide } from "./station-guide.js";
|
|
65
65
|
import { StationRunner } from "./station-runner.js";
|
|
66
66
|
import { StationError, StationStore, stationOfChannel } from "./stations.js";
|
|
67
67
|
import { STATION_CONTROL_LIMIT, StationUsage, limitsFromEnv } from "./station-metering.js";
|
|
@@ -2204,6 +2204,22 @@ export function createHandler(engine, options) {
|
|
|
2204
2204
|
return { allowed: false, account: "" };
|
|
2205
2205
|
};
|
|
2206
2206
|
if (isGuidePage) {
|
|
2207
|
+
const encrypted = request.socket.encrypted === true;
|
|
2208
|
+
const entries = guideEntries({
|
|
2209
|
+
store: options.stations.store,
|
|
2210
|
+
runner: options.stations.runner,
|
|
2211
|
+
channels: options.channels,
|
|
2212
|
+
canControl: false,
|
|
2213
|
+
account: "",
|
|
2214
|
+
select: () => null,
|
|
2215
|
+
trackFor: (file) => trackFor(engine, file),
|
|
2216
|
+
base: `${encrypted ? "https" : "http"}://${request.headers.host ?? "localhost"}`,
|
|
2217
|
+
publicBase: options.stations.publicBase?.() ?? "",
|
|
2218
|
+
json,
|
|
2219
|
+
readBody,
|
|
2220
|
+
headers: CORS,
|
|
2221
|
+
});
|
|
2222
|
+
const page = renderGuide(entries);
|
|
2207
2223
|
response.writeHead(200, {
|
|
2208
2224
|
"content-type": "text/html; charset=utf-8",
|
|
2209
2225
|
"cache-control": "no-cache",
|
|
@@ -2211,7 +2227,7 @@ export function createHandler(engine, options) {
|
|
|
2211
2227
|
"referrer-policy": "no-referrer",
|
|
2212
2228
|
"x-content-type-options": "nosniff",
|
|
2213
2229
|
});
|
|
2214
|
-
response.end(request.method === "HEAD" ? undefined :
|
|
2230
|
+
response.end(request.method === "HEAD" ? undefined : page);
|
|
2215
2231
|
return;
|
|
2216
2232
|
}
|
|
2217
2233
|
// The page a station's link opens. The same bytes for every station: it
|
|
@@ -2292,6 +2308,7 @@ export function createHandler(engine, options) {
|
|
|
2292
2308
|
},
|
|
2293
2309
|
trackFor: (file) => trackFor(engine, file),
|
|
2294
2310
|
base: `${scheme}://${request.headers.host ?? "localhost"}`,
|
|
2311
|
+
publicBase: options.stations.publicBase?.() ?? "",
|
|
2295
2312
|
json,
|
|
2296
2313
|
readBody,
|
|
2297
2314
|
headers: CORS,
|
|
@@ -6289,7 +6306,11 @@ export async function serve(argv, version = "0.1.0") {
|
|
|
6289
6306
|
return { started: true, settings };
|
|
6290
6307
|
},
|
|
6291
6308
|
};
|
|
6292
|
-
const stations = {
|
|
6309
|
+
const stations = {
|
|
6310
|
+
store: stationStore, runner: stationRunner, usage: stationUsage, limits: stationLimits, auto: stationAuto,
|
|
6311
|
+
// Known once the server has worked out its addresses, after it is listening.
|
|
6312
|
+
publicBase: () => (publishable_?.url ?? "").replace(/\/+$/, ""),
|
|
6313
|
+
};
|
|
6293
6314
|
// Music handed over from BitTorrented, copied into a folder of our own.
|
|
6294
6315
|
const importer = new Importer(join(stateDir(), `handoffs-${options.port}.json`), {
|
|
6295
6316
|
index: libraryIndex,
|
package/dist/station-guide.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface GuideEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
kind: "audio" | "video";
|
|
4
|
+
state: string;
|
|
5
|
+
page: string;
|
|
6
|
+
nowPlaying: {
|
|
7
|
+
title: string;
|
|
8
|
+
artist: string;
|
|
9
|
+
} | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The guide with its stations already in it, so it reads the same through a
|
|
13
|
+
* gateway that cannot run its script against this server (the Moshpit's
|
|
14
|
+
* /n/<name>), and for a crawler. Everything from a station is escaped.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderGuide(entries: GuideEntry[]): string;
|
|
17
|
+
export declare const GUIDE_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Live \u00B7 stations</title>\n<meta name=\"description\" content=\"Radio and TV stations, live now.\">\n<link rel=\"icon\" href=\"data:,\">\n<style>\n:root{--bg:#f6f5f2;--fg:#17171a;--muted:#5d5d66;--card:#fff;--line:#dedcd6;--accent:#1f6feb;--live:#0b7a3b}\n@media (prefers-color-scheme:dark){:root{--bg:#121214;--fg:#ececf1;--muted:#a4a4b0;--card:#1c1c20;--line:#2c2c33;--accent:#6aa7ff;--live:#3fbf7f}}\n*{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}\nmain{max-width:880px;margin:0 auto;padding:40px 16px}\nh1{margin:0 0 4px;font-size:1.8rem}p.lead{color:var(--muted);margin:0 0 24px}\nh2{font-size:1rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:28px 0 10px}\n.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}\na.station{display:block;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px;color:inherit;text-decoration:none}\na.station:hover,a.station:focus-visible{border-color:var(--accent);outline:none}\n.name{font-weight:700;font-size:1.05rem}.now{color:var(--muted);font-size:.9rem;margin-top:6px;min-height:1.4em}\n.live{color:var(--live);font-size:.8rem;font-weight:700}.empty{color:var(--muted)}\nfooter{margin-top:40px;color:var(--muted);font-size:.85rem}footer a{color:inherit}\n</style>\n</head>\n<body>\n<main>\n <h1>Live</h1>\n <p class=\"lead\">Radio and TV, on the air now. Pick one and press play.</p>\n <h2 id=\"radio-title\" hidden>Radio</h2>\n <div id=\"radio\" class=\"grid\" aria-live=\"polite\"></div>\n <h2 id=\"tv-title\" hidden>TV</h2>\n <div id=\"tv\" class=\"grid\" aria-live=\"polite\"></div>\n <p id=\"empty\" class=\"empty\">Nothing is on the air here yet.</p>\n <footer>Played by <a href=\"https://nixamp.com\">nixamp</a>, on the Moshpit.</footer>\n</main>\n<script>\n(async () => {\n const el = (tag, cls, text) => { const n = document.createElement(tag); if (cls) n.className = cls; if (text) n.textContent = text; return n; };\n const draw = (stations) => {\n for (const [kind, box] of [[\"audio\", \"#radio\"], [\"video\", \"#tv\"]]) {\n const grid = document.querySelector(box);\n grid.replaceChildren();\n const list = stations.filter((s) => s.kind === kind);\n document.querySelector(box + \"-title\").hidden = list.length === 0;\n for (const s of list) {\n const a = el(\"a\", \"station\");\n a.href = s.page;\n a.append(el(\"div\", \"live\", s.state === \"live\" ? \"\u25CF LIVE\" : \"off the air\"), el(\"div\", \"name\", s.name),\n el(\"div\", \"now\", s.nowPlaying ? [s.nowPlaying.title, s.nowPlaying.artist].filter(Boolean).join(\" \u2014 \") : \"\"));\n grid.append(a);\n }\n }\n document.querySelector(\"#empty\").hidden = stations.length > 0;\n };\n const load = async () => {\n try {\n const r = await fetch(\"/api/v1/stations/guide\", { cache: \"no-store\" });\n if (r.ok && (r.headers.get(\"content-type\") || \"\").includes(\"json\")) draw((await r.json()).stations);\n } catch {}\n };\n await load();\n setInterval(load, 15000);\n})();\n</script>\n</body>\n</html>\n";
|
|
2
18
|
export declare const GUIDE_CSP: string;
|
|
3
19
|
/**
|
|
4
20
|
* The hosts whose front page is the guide: `guideHosts` in config.json
|
package/dist/station-guide.js
CHANGED
|
@@ -44,7 +44,7 @@ const SCRIPT = `
|
|
|
44
44
|
const load = async () => {
|
|
45
45
|
try {
|
|
46
46
|
const r = await fetch("/api/v1/stations/guide", { cache: "no-store" });
|
|
47
|
-
if (r.ok) draw((await r.json()).stations);
|
|
47
|
+
if (r.ok && (r.headers.get("content-type") || "").includes("json")) draw((await r.json()).stations);
|
|
48
48
|
} catch {}
|
|
49
49
|
};
|
|
50
50
|
await load();
|
|
@@ -52,6 +52,28 @@ const SCRIPT = `
|
|
|
52
52
|
})();
|
|
53
53
|
`;
|
|
54
54
|
const hash = (text) => `'sha256-${createHash("sha256").update(text).digest("base64")}'`;
|
|
55
|
+
function escape(text) {
|
|
56
|
+
return text.replace(/[&<>"']/g, (one) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[one]);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The guide with its stations already in it, so it reads the same through a
|
|
60
|
+
* gateway that cannot run its script against this server (the Moshpit's
|
|
61
|
+
* /n/<name>), and for a crawler. Everything from a station is escaped.
|
|
62
|
+
*/
|
|
63
|
+
export function renderGuide(entries) {
|
|
64
|
+
const cards = (kind) => entries
|
|
65
|
+
.filter((one) => one.kind === kind && /^https?:\/\//.test(one.page))
|
|
66
|
+
.map((one) => `<a class="station" href="${escape(one.page)}"><div class="live">${one.state === "live" ? "● LIVE" : "off the air"}</div><div class="name">${escape(one.name)}</div><div class="now">${one.nowPlaying ? escape([one.nowPlaying.title, one.nowPlaying.artist].filter(Boolean).join(" — ")) : ""}</div></a>`)
|
|
67
|
+
.join("");
|
|
68
|
+
const radio = cards("audio");
|
|
69
|
+
const tv = cards("video");
|
|
70
|
+
return GUIDE_HTML
|
|
71
|
+
.replace('<h2 id="radio-title" hidden>', radio ? '<h2 id="radio-title">' : '<h2 id="radio-title" hidden>')
|
|
72
|
+
.replace('<div id="radio" class="grid" aria-live="polite"></div>', `<div id="radio" class="grid" aria-live="polite">${radio}</div>`)
|
|
73
|
+
.replace('<h2 id="tv-title" hidden>', tv ? '<h2 id="tv-title">' : '<h2 id="tv-title" hidden>')
|
|
74
|
+
.replace('<div id="tv" class="grid" aria-live="polite"></div>', `<div id="tv" class="grid" aria-live="polite">${tv}</div>`)
|
|
75
|
+
.replace('<p id="empty" class="empty">', entries.length ? '<p id="empty" class="empty" hidden>' : '<p id="empty" class="empty">');
|
|
76
|
+
}
|
|
55
77
|
export const GUIDE_HTML = `<!doctype html>
|
|
56
78
|
<html lang="en">
|
|
57
79
|
<head>
|
package/dist/station-routes.d.ts
CHANGED
|
@@ -40,6 +40,12 @@ export interface StationContext {
|
|
|
40
40
|
} | null;
|
|
41
41
|
/** This server's address as the asker reached it, for links. */
|
|
42
42
|
base: string;
|
|
43
|
+
/**
|
|
44
|
+
* This server's public https address, for links that leave this request's
|
|
45
|
+
* host: the guide is often shown under another name (a Moshpit name through
|
|
46
|
+
* a gateway), and a station is listened to here, not there.
|
|
47
|
+
*/
|
|
48
|
+
publicBase?: string;
|
|
43
49
|
json: (response: ServerResponse, status: number, body: unknown) => void;
|
|
44
50
|
readBody: (request: IncomingMessage) => Promise<string>;
|
|
45
51
|
/** Headers every answer carries (CORS). */
|
|
@@ -57,13 +63,18 @@ export interface StationContext {
|
|
|
57
63
|
setting: () => unknown;
|
|
58
64
|
};
|
|
59
65
|
}
|
|
60
|
-
declare function links(ctx: StationContext, station: Station): {
|
|
66
|
+
declare function links(ctx: StationContext, station: Station, base?: string): {
|
|
61
67
|
page: string;
|
|
62
68
|
stream: string;
|
|
63
69
|
m3u: string;
|
|
64
70
|
state: string;
|
|
65
71
|
};
|
|
66
72
|
export declare function publicView(ctx: StationContext, station: Station): PublicStation;
|
|
73
|
+
/** What the public guide shows: public, listed stations, linked at this server's public address. */
|
|
74
|
+
export declare function guideEntries(ctx: StationContext): Array<PublicStation & {
|
|
75
|
+
page: string;
|
|
76
|
+
m3u: string;
|
|
77
|
+
}>;
|
|
67
78
|
export declare function ownerView(ctx: StationContext, station: Station): OwnerStation & {
|
|
68
79
|
links: ReturnType<typeof links>;
|
|
69
80
|
nowPlaying: string;
|
package/dist/station-routes.js
CHANGED
|
@@ -13,11 +13,11 @@ function fail(ctx, response, error) {
|
|
|
13
13
|
}
|
|
14
14
|
ctx.json(response, 500, { error: error instanceof Error ? error.message : String(error), code: "internal" });
|
|
15
15
|
}
|
|
16
|
-
function links(ctx, station) {
|
|
16
|
+
function links(ctx, station, base = ctx.base) {
|
|
17
17
|
const query = `t=${encodeURIComponent(station.listenToken)}`;
|
|
18
|
-
const at = `${
|
|
18
|
+
const at = `${base}/api/v1/stations/${station.id}`;
|
|
19
19
|
return {
|
|
20
|
-
page: `${
|
|
20
|
+
page: `${base}/station/${station.id}?${query}`,
|
|
21
21
|
stream: `${at}/stream?${query}`,
|
|
22
22
|
m3u: `${at}/listen.m3u?${query}`,
|
|
23
23
|
state: `${at}/state?${query}`,
|
|
@@ -50,6 +50,13 @@ export function publicView(ctx, station) {
|
|
|
50
50
|
listeners: ctx.runner.listeners(station.id),
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
+
/** What the public guide shows: public, listed stations, linked at this server's public address. */
|
|
54
|
+
export function guideEntries(ctx) {
|
|
55
|
+
const base = ctx.publicBase || ctx.base;
|
|
56
|
+
return ctx.store.list()
|
|
57
|
+
.filter((one) => one.visibility === "public" && one.listed)
|
|
58
|
+
.map((one) => ({ ...publicView(ctx, one), page: links(ctx, one, base).page, m3u: links(ctx, one, base).m3u }));
|
|
59
|
+
}
|
|
53
60
|
export function ownerView(ctx, station) {
|
|
54
61
|
const { failures, idempotencyKey: _key, ...rest } = station;
|
|
55
62
|
return {
|
|
@@ -74,10 +81,7 @@ export async function handleStations(request, response, path, url, ctx) {
|
|
|
74
81
|
// The public guide: only stations their owner made public and listed, with
|
|
75
82
|
// their links, because public is what that means. Nothing else, ever.
|
|
76
83
|
if (path === "/api/v1/stations/guide" && (method === "GET" || method === "HEAD")) {
|
|
77
|
-
|
|
78
|
-
ctx.json(response, 200, {
|
|
79
|
-
stations: listed.map((one) => ({ ...publicView(ctx, one), page: links(ctx, one).page, m3u: links(ctx, one).m3u })),
|
|
80
|
-
});
|
|
84
|
+
ctx.json(response, 200, { stations: guideEntries(ctx) });
|
|
81
85
|
return true;
|
|
82
86
|
}
|
|
83
87
|
const listen = LISTEN.exec(path);
|
package/package.json
CHANGED
package/src/auto-stations.ts
CHANGED
|
@@ -43,6 +43,26 @@ const NOT_MUSIC = /lecture|interview|audiobook|podcast|speech|spoken|talk|course
|
|
|
43
43
|
/** Never on a genre TV station, whatever nichedb calls it. */
|
|
44
44
|
const ADULT = /\b(xxx|porn|nsfw|onlyfans|brazzers|blacked|bangbros|milf|hentai|sex|erotic|adult)\b/i;
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* A film genre as one name, whatever case or spelling nichedb's sources
|
|
48
|
+
* used: "action" and "Action" are one station, and so are "Science Fiction",
|
|
49
|
+
* "Science-Fiction" and "Sci-Fi".
|
|
50
|
+
*/
|
|
51
|
+
export function filmGenre(raw: string): string {
|
|
52
|
+
const word = raw.trim().toLowerCase().replace(/[\s_-]+/g, " ");
|
|
53
|
+
const synonyms: Record<string, string> = {
|
|
54
|
+
"science fiction": "Sci-Fi", "sci fi": "Sci-Fi", "scifi": "Sci-Fi",
|
|
55
|
+
"documentary": "Documentary", "docu": "Documentary",
|
|
56
|
+
"animation": "Animation", "animated": "Animation", "anime": "Animation",
|
|
57
|
+
"musical": "Music", "music": "Music",
|
|
58
|
+
"kids": "Family", "children": "Family", "family": "Family",
|
|
59
|
+
"war & politics": "War", "war": "War",
|
|
60
|
+
"action & adventure": "Action", "sci fi & fantasy": "Sci-Fi",
|
|
61
|
+
};
|
|
62
|
+
if (synonyms[word]) return synonyms[word];
|
|
63
|
+
return word.replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
64
|
+
}
|
|
65
|
+
|
|
46
66
|
export function adultTitle(title: string, genres: string[] = []): boolean {
|
|
47
67
|
return ADULT.test(title) || genres.some((one) => /adult|erotic|porn/i.test(one));
|
|
48
68
|
}
|
|
@@ -156,7 +176,7 @@ export async function syncAutoStations(deps: AutoDeps, options: AutoOptions = DE
|
|
|
156
176
|
const title = shown(item).title;
|
|
157
177
|
const genres = await deps.filmGenres(title).catch(() => []);
|
|
158
178
|
if (adultTitle(`${title} ${item.rel}`, genres)) continue;
|
|
159
|
-
for (const genre of genres.slice(0, 2)) {
|
|
179
|
+
for (const genre of [...new Set(genres.map(filmGenre))].slice(0, 2)) {
|
|
160
180
|
const list = tv.get(genre) ?? [];
|
|
161
181
|
list.push(item);
|
|
162
182
|
tv.set(genre, list);
|
package/src/server.ts
CHANGED
|
@@ -71,14 +71,14 @@ import { ArtCache, coverArtOf, stillFrom } from "./art.ts";
|
|
|
71
71
|
import { PartyLine, telnyxSms } from "./partyline.ts";
|
|
72
72
|
import { HlsPackagers, segmentType, withKey } from "./hls.ts";
|
|
73
73
|
import { refusedDestination } from "./destinations.ts";
|
|
74
|
-
import { handleStations, isStationListenPath } from "./station-routes.ts";
|
|
74
|
+
import { guideEntries, handleStations, isStationListenPath } from "./station-routes.ts";
|
|
75
75
|
import { handleLibrary } from "./library-routes.ts";
|
|
76
76
|
import { LibraryIndex, probeItem, trackOf, type Probed } from "./library-index.ts";
|
|
77
77
|
import { ListenerStore } from "./library-user.ts";
|
|
78
78
|
import { Importer } from "./handoff.ts";
|
|
79
79
|
import { handleHandoffs } from "./handoff-routes.ts";
|
|
80
80
|
import { STATION_PAGE, STATION_PAGE_CSP, STATION_PAGE_HTML } from "./station-page.ts";
|
|
81
|
-
import { GUIDE_CSP,
|
|
81
|
+
import { GUIDE_CSP, guideHosts, renderGuide } from "./station-guide.ts";
|
|
82
82
|
import { StationRunner } from "./station-runner.ts";
|
|
83
83
|
import { StationError, StationStore, channelOf, stationOfChannel, type Station } from "./stations.ts";
|
|
84
84
|
import { STATION_CONTROL_LIMIT, StationUsage, limitsFromEnv, type Limits } from "./station-metering.ts";
|
|
@@ -1726,6 +1726,8 @@ export interface HandlerOptions {
|
|
|
1726
1726
|
usage?: StationUsage;
|
|
1727
1727
|
limits?: Limits;
|
|
1728
1728
|
auto?: { sync: (input: Record<string, unknown>) => Promise<unknown>; setting: () => unknown };
|
|
1729
|
+
/** This server's public https address, once it is known. */
|
|
1730
|
+
publicBase?: () => string;
|
|
1729
1731
|
};
|
|
1730
1732
|
web: string | null;
|
|
1731
1733
|
/** Branded clients on this same backend, keyed by an explicitly configured host. */
|
|
@@ -2720,6 +2722,22 @@ export function createHandler(engine: Engine, options: HandlerOptions) {
|
|
|
2720
2722
|
};
|
|
2721
2723
|
|
|
2722
2724
|
if (isGuidePage) {
|
|
2725
|
+
const encrypted = (request.socket as { encrypted?: boolean }).encrypted === true;
|
|
2726
|
+
const entries = guideEntries({
|
|
2727
|
+
store: options.stations!.store,
|
|
2728
|
+
runner: options.stations!.runner,
|
|
2729
|
+
channels: options.channels!,
|
|
2730
|
+
canControl: false,
|
|
2731
|
+
account: "",
|
|
2732
|
+
select: () => null,
|
|
2733
|
+
trackFor: (file) => trackFor(engine, file),
|
|
2734
|
+
base: `${encrypted ? "https" : "http"}://${request.headers.host ?? "localhost"}`,
|
|
2735
|
+
publicBase: options.stations!.publicBase?.() ?? "",
|
|
2736
|
+
json,
|
|
2737
|
+
readBody,
|
|
2738
|
+
headers: CORS,
|
|
2739
|
+
});
|
|
2740
|
+
const page = renderGuide(entries);
|
|
2723
2741
|
response.writeHead(200, {
|
|
2724
2742
|
"content-type": "text/html; charset=utf-8",
|
|
2725
2743
|
"cache-control": "no-cache",
|
|
@@ -2727,7 +2745,7 @@ export function createHandler(engine: Engine, options: HandlerOptions) {
|
|
|
2727
2745
|
"referrer-policy": "no-referrer",
|
|
2728
2746
|
"x-content-type-options": "nosniff",
|
|
2729
2747
|
});
|
|
2730
|
-
response.end(request.method === "HEAD" ? undefined :
|
|
2748
|
+
response.end(request.method === "HEAD" ? undefined : page);
|
|
2731
2749
|
return;
|
|
2732
2750
|
}
|
|
2733
2751
|
|
|
@@ -2810,6 +2828,7 @@ export function createHandler(engine: Engine, options: HandlerOptions) {
|
|
|
2810
2828
|
},
|
|
2811
2829
|
trackFor: (file) => trackFor(engine, file),
|
|
2812
2830
|
base: `${scheme}://${request.headers.host ?? "localhost"}`,
|
|
2831
|
+
publicBase: options.stations.publicBase?.() ?? "",
|
|
2813
2832
|
json,
|
|
2814
2833
|
readBody,
|
|
2815
2834
|
headers: CORS,
|
|
@@ -6777,7 +6796,11 @@ export async function serve(argv: string[], version = "0.1.0"): Promise<void> {
|
|
|
6777
6796
|
return { started: true, settings };
|
|
6778
6797
|
},
|
|
6779
6798
|
};
|
|
6780
|
-
const stations = {
|
|
6799
|
+
const stations = {
|
|
6800
|
+
store: stationStore, runner: stationRunner, usage: stationUsage, limits: stationLimits, auto: stationAuto,
|
|
6801
|
+
// Known once the server has worked out its addresses, after it is listening.
|
|
6802
|
+
publicBase: () => (publishable_?.url ?? "").replace(/\/+$/, ""),
|
|
6803
|
+
};
|
|
6781
6804
|
// Music handed over from BitTorrented, copied into a folder of our own.
|
|
6782
6805
|
const importer = new Importer(join(stateDir(), `handoffs-${options.port}.json`), {
|
|
6783
6806
|
index: libraryIndex,
|
package/src/station-guide.ts
CHANGED
|
@@ -46,7 +46,7 @@ const SCRIPT = `
|
|
|
46
46
|
const load = async () => {
|
|
47
47
|
try {
|
|
48
48
|
const r = await fetch("/api/v1/stations/guide", { cache: "no-store" });
|
|
49
|
-
if (r.ok) draw((await r.json()).stations);
|
|
49
|
+
if (r.ok && (r.headers.get("content-type") || "").includes("json")) draw((await r.json()).stations);
|
|
50
50
|
} catch {}
|
|
51
51
|
};
|
|
52
52
|
await load();
|
|
@@ -56,6 +56,38 @@ const SCRIPT = `
|
|
|
56
56
|
|
|
57
57
|
const hash = (text: string): string => `'sha256-${createHash("sha256").update(text).digest("base64")}'`;
|
|
58
58
|
|
|
59
|
+
function escape(text: string): string {
|
|
60
|
+
return text.replace(/[&<>"']/g, (one) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[one]!);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface GuideEntry {
|
|
64
|
+
name: string;
|
|
65
|
+
kind: "audio" | "video";
|
|
66
|
+
state: string;
|
|
67
|
+
page: string;
|
|
68
|
+
nowPlaying: { title: string; artist: string } | null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The guide with its stations already in it, so it reads the same through a
|
|
73
|
+
* gateway that cannot run its script against this server (the Moshpit's
|
|
74
|
+
* /n/<name>), and for a crawler. Everything from a station is escaped.
|
|
75
|
+
*/
|
|
76
|
+
export function renderGuide(entries: GuideEntry[]): string {
|
|
77
|
+
const cards = (kind: "audio" | "video"): string => entries
|
|
78
|
+
.filter((one) => one.kind === kind && /^https?:\/\//.test(one.page))
|
|
79
|
+
.map((one) => `<a class="station" href="${escape(one.page)}"><div class="live">${one.state === "live" ? "● LIVE" : "off the air"}</div><div class="name">${escape(one.name)}</div><div class="now">${one.nowPlaying ? escape([one.nowPlaying.title, one.nowPlaying.artist].filter(Boolean).join(" — ")) : ""}</div></a>`)
|
|
80
|
+
.join("");
|
|
81
|
+
const radio = cards("audio");
|
|
82
|
+
const tv = cards("video");
|
|
83
|
+
return GUIDE_HTML
|
|
84
|
+
.replace('<h2 id="radio-title" hidden>', radio ? '<h2 id="radio-title">' : '<h2 id="radio-title" hidden>')
|
|
85
|
+
.replace('<div id="radio" class="grid" aria-live="polite"></div>', `<div id="radio" class="grid" aria-live="polite">${radio}</div>`)
|
|
86
|
+
.replace('<h2 id="tv-title" hidden>', tv ? '<h2 id="tv-title">' : '<h2 id="tv-title" hidden>')
|
|
87
|
+
.replace('<div id="tv" class="grid" aria-live="polite"></div>', `<div id="tv" class="grid" aria-live="polite">${tv}</div>`)
|
|
88
|
+
.replace('<p id="empty" class="empty">', entries.length ? '<p id="empty" class="empty" hidden>' : '<p id="empty" class="empty">');
|
|
89
|
+
}
|
|
90
|
+
|
|
59
91
|
export const GUIDE_HTML = `<!doctype html>
|
|
60
92
|
<html lang="en">
|
|
61
93
|
<head>
|
package/src/station-routes.ts
CHANGED
|
@@ -42,6 +42,12 @@ export interface StationContext {
|
|
|
42
42
|
trackFor: (file: string) => { title: string; artist: string; album: string } | null;
|
|
43
43
|
/** This server's address as the asker reached it, for links. */
|
|
44
44
|
base: string;
|
|
45
|
+
/**
|
|
46
|
+
* This server's public https address, for links that leave this request's
|
|
47
|
+
* host: the guide is often shown under another name (a Moshpit name through
|
|
48
|
+
* a gateway), and a station is listened to here, not there.
|
|
49
|
+
*/
|
|
50
|
+
publicBase?: string;
|
|
45
51
|
json: (response: ServerResponse, status: number, body: unknown) => void;
|
|
46
52
|
readBody: (request: IncomingMessage) => Promise<string>;
|
|
47
53
|
/** Headers every answer carries (CORS). */
|
|
@@ -63,11 +69,11 @@ function fail(ctx: StationContext, response: ServerResponse, error: unknown): vo
|
|
|
63
69
|
ctx.json(response, 500, { error: error instanceof Error ? error.message : String(error), code: "internal" });
|
|
64
70
|
}
|
|
65
71
|
|
|
66
|
-
function links(ctx: StationContext, station: Station): { page: string; stream: string; m3u: string; state: string } {
|
|
72
|
+
function links(ctx: StationContext, station: Station, base = ctx.base): { page: string; stream: string; m3u: string; state: string } {
|
|
67
73
|
const query = `t=${encodeURIComponent(station.listenToken)}`;
|
|
68
|
-
const at = `${
|
|
74
|
+
const at = `${base}/api/v1/stations/${station.id}`;
|
|
69
75
|
return {
|
|
70
|
-
page: `${
|
|
76
|
+
page: `${base}/station/${station.id}?${query}`,
|
|
71
77
|
stream: `${at}/stream?${query}`,
|
|
72
78
|
m3u: `${at}/listen.m3u?${query}`,
|
|
73
79
|
state: `${at}/state?${query}`,
|
|
@@ -102,6 +108,14 @@ export function publicView(ctx: StationContext, station: Station): PublicStation
|
|
|
102
108
|
};
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
/** What the public guide shows: public, listed stations, linked at this server's public address. */
|
|
112
|
+
export function guideEntries(ctx: StationContext): Array<PublicStation & { page: string; m3u: string }> {
|
|
113
|
+
const base = ctx.publicBase || ctx.base;
|
|
114
|
+
return ctx.store.list()
|
|
115
|
+
.filter((one) => one.visibility === "public" && one.listed)
|
|
116
|
+
.map((one) => ({ ...publicView(ctx, one), page: links(ctx, one, base).page, m3u: links(ctx, one, base).m3u }));
|
|
117
|
+
}
|
|
118
|
+
|
|
105
119
|
export function ownerView(ctx: StationContext, station: Station): OwnerStation & { links: ReturnType<typeof links>; nowPlaying: string } {
|
|
106
120
|
const { failures, idempotencyKey: _key, ...rest } = station;
|
|
107
121
|
return {
|
|
@@ -133,10 +147,7 @@ export async function handleStations(
|
|
|
133
147
|
// The public guide: only stations their owner made public and listed, with
|
|
134
148
|
// their links, because public is what that means. Nothing else, ever.
|
|
135
149
|
if (path === "/api/v1/stations/guide" && (method === "GET" || method === "HEAD")) {
|
|
136
|
-
|
|
137
|
-
ctx.json(response, 200, {
|
|
138
|
-
stations: listed.map((one) => ({ ...publicView(ctx, one), page: links(ctx, one).page, m3u: links(ctx, one).m3u })),
|
|
139
|
-
});
|
|
150
|
+
ctx.json(response, 200, { stations: guideEntries(ctx) });
|
|
140
151
|
return true;
|
|
141
152
|
}
|
|
142
153
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./main-
|
|
1
|
+
import{n as e}from"./main-B8hCuIBx.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{n as e}from"./main-
|
|
1
|
+
import{n as e}from"./main-B8hCuIBx.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{n as e}from"./main-
|
|
1
|
+
import{n as e}from"./main-B8hCuIBx.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};
|