nixamp 0.59.3 → 0.59.5
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-label.d.ts +15 -1
- package/dist/ai-label.js +46 -7
- package/dist/station-cli.js +4 -2
- package/dist/station-mcp.d.ts +15 -0
- package/dist/station-mcp.js +2 -1
- package/dist/station-usage.d.ts +1 -1
- package/dist/station-usage.js +1 -0
- package/package.json +1 -1
- package/src/ai-label.ts +49 -7
- package/src/station-cli.ts +4 -2
- package/src/station-mcp.ts +2 -1
- package/src/station-usage.ts +1 -0
- package/web/dist/assets/{ar-C1vsW7kb.js → ar-D7L1Lzg5.js} +1 -1
- package/web/dist/assets/{cs-DdI0DUJ-.js → cs-DR-oumcX.js} +1 -1
- package/web/dist/assets/{da-9aL7XsmI.js → da-B7ofIVod.js} +1 -1
- package/web/dist/assets/{de-D2CK66IC.js → de-CglXPk_n.js} +1 -1
- package/web/dist/assets/{es-CeULmOqO.js → es-CYVNiI20.js} +1 -1
- package/web/dist/assets/{fi--fXGaHnz.js → fi-Bktga6d_.js} +1 -1
- package/web/dist/assets/{fr-C7-X5Tn_.js → fr-CNxMDHg5.js} +1 -1
- package/web/dist/assets/{hi-Bjxltwmd.js → hi-DEyWHgib.js} +1 -1
- package/web/dist/assets/{hu-H49fNi0d.js → hu-mcHUOvhY.js} +1 -1
- package/web/dist/assets/{id-CAnPMMXh.js → id-T9wfahs5.js} +1 -1
- package/web/dist/assets/{it-Dhhk9yRT.js → it-CASLaiyC.js} +1 -1
- package/web/dist/assets/{main-DN_lvs_l.js → main-D9-BuE2r.js} +2 -2
- package/web/dist/assets/{nl-BXYCeuyq.js → nl-DQ-YPUBS.js} +1 -1
- package/web/dist/assets/{ru-CY8bXjoy.js → ru-CDSDPqFZ.js} +1 -1
- package/web/dist/assets/{sv-DPGZbBeq.js → sv-liuu51-p.js} +1 -1
- package/web/dist/assets/{uk-BJ06TmIU.js → uk-B3vreqbA.js} +1 -1
- package/web/dist/assets/{vi-C3XnX7nr.js → vi-B0NyoUEc.js} +1 -1
- package/web/dist/assets/{zh-B2zuk7PJ.js → zh-Bw5OQASg.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/sw.js +19 -19
package/dist/ai-label.d.ts
CHANGED
|
@@ -94,7 +94,11 @@ export interface LabelSettings {
|
|
|
94
94
|
parallel: number;
|
|
95
95
|
/** Genres whose artists get their albums first, in this order. */
|
|
96
96
|
genreOrder: string[];
|
|
97
|
-
/**
|
|
97
|
+
/** The day of the month the budget renews (the provider's billing day), 1-28. */
|
|
98
|
+
resetDay: number;
|
|
99
|
+
/** The budget month a pause for lack of credit began in: a new month lifts it. */
|
|
100
|
+
pausedPeriod?: string;
|
|
101
|
+
/** Set by a provider that is out of credit; cleared by `resume`, or by the next budget month. */
|
|
98
102
|
pausedReason: string;
|
|
99
103
|
}
|
|
100
104
|
export type ArtistPreset = Pick<LabelArtist, "name" | "genre" | "sound" | "voice" | "bio" | "themes">;
|
|
@@ -178,6 +182,14 @@ export declare function renderStoryVideo(ffmpeg: string[], input: {
|
|
|
178
182
|
export declare function renderVideo(ffmpeg: string[], audio: string, cover: string, out: string): Promise<void>;
|
|
179
183
|
/** A video made before videos carried tags, given its song's: streams copied, nothing re-encoded. */
|
|
180
184
|
export declare function retagVideo(ffmpeg: string[], video: string, audio: string, out: string): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* The budget month `at` falls in, as "YYYY-MM" of the month it started in:
|
|
187
|
+
* months run from `resetDay` (the provider's billing day, so the cap and the
|
|
188
|
+
* credits renew together) to the same day of the next month.
|
|
189
|
+
*/
|
|
190
|
+
export declare function periodOf(at: number, resetDay?: number): string;
|
|
191
|
+
/** When the budget month after `at` begins. */
|
|
192
|
+
export declare function nextReset(at: number, resetDay?: number): number;
|
|
181
193
|
export interface AiLabelDeps {
|
|
182
194
|
index: LibraryIndex;
|
|
183
195
|
store: StationStore;
|
|
@@ -258,6 +270,8 @@ export declare class AiLabel {
|
|
|
258
270
|
list(): LabelArtist[];
|
|
259
271
|
get(key: string): LabelArtist | undefined;
|
|
260
272
|
holder(): string;
|
|
273
|
+
/** The budget month now, renewing on resetDay. */
|
|
274
|
+
private period;
|
|
261
275
|
private budgetLeft;
|
|
262
276
|
/** When this artist's next album is due: its first ones at once, then every `everyDays`, staggered by artist. */
|
|
263
277
|
dueAt(artist: LabelArtist): number;
|
package/dist/ai-label.js
CHANGED
|
@@ -263,6 +263,7 @@ export const DEFAULTS = {
|
|
|
263
263
|
holder: "Profullstack, Inc.",
|
|
264
264
|
enabled: true,
|
|
265
265
|
monthlySeconds: 3600,
|
|
266
|
+
resetDay: 1,
|
|
266
267
|
everyDays: 30,
|
|
267
268
|
albumsPerDay: 1,
|
|
268
269
|
newArtistChance: 0.25,
|
|
@@ -589,8 +590,29 @@ function tagFile(ffmpeg, from, to, tags, cover) {
|
|
|
589
590
|
execFile(ffmpeg[0], args, { timeout: 120_000 }, (error) => (error ? fail(new Error(`tagging failed: ${error.message}`)) : done()));
|
|
590
591
|
});
|
|
591
592
|
}
|
|
592
|
-
|
|
593
|
-
|
|
593
|
+
/**
|
|
594
|
+
* The budget month `at` falls in, as "YYYY-MM" of the month it started in:
|
|
595
|
+
* months run from `resetDay` (the provider's billing day, so the cap and the
|
|
596
|
+
* credits renew together) to the same day of the next month.
|
|
597
|
+
*/
|
|
598
|
+
export function periodOf(at, resetDay = 1) {
|
|
599
|
+
const date = new Date(at);
|
|
600
|
+
let year = date.getUTCFullYear();
|
|
601
|
+
let month = date.getUTCMonth();
|
|
602
|
+
if (date.getUTCDate() < resetDay) {
|
|
603
|
+
month -= 1;
|
|
604
|
+
if (month < 0) {
|
|
605
|
+
month = 11;
|
|
606
|
+
year -= 1;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return `${year}-${String(month + 1).padStart(2, "0")}`;
|
|
610
|
+
}
|
|
611
|
+
/** When the budget month after `at` begins. */
|
|
612
|
+
export function nextReset(at, resetDay = 1) {
|
|
613
|
+
const date = new Date(at);
|
|
614
|
+
const thisMonth = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), resetDay);
|
|
615
|
+
return date.getUTCDate() < resetDay ? thisMonth : Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, resetDay);
|
|
594
616
|
}
|
|
595
617
|
export class AiLabel {
|
|
596
618
|
file;
|
|
@@ -672,10 +694,14 @@ export class AiLabel {
|
|
|
672
694
|
holder() {
|
|
673
695
|
return this.settings.holder;
|
|
674
696
|
}
|
|
697
|
+
/** The budget month now, renewing on resetDay. */
|
|
698
|
+
period() {
|
|
699
|
+
return periodOf(this.now(), this.settings.resetDay ?? 1);
|
|
700
|
+
}
|
|
675
701
|
budgetLeft() {
|
|
676
702
|
if (this.settings.monthlySeconds === 0)
|
|
677
703
|
return Number.POSITIVE_INFINITY;
|
|
678
|
-
return this.settings.monthlySeconds - (this.usage[
|
|
704
|
+
return this.settings.monthlySeconds - (this.usage[this.period()] ?? 0);
|
|
679
705
|
}
|
|
680
706
|
/** When this artist's next album is due: its first ones at once, then every `everyDays`, staggered by artist. */
|
|
681
707
|
dueAt(artist) {
|
|
@@ -694,7 +720,7 @@ export class AiLabel {
|
|
|
694
720
|
return artist.failures > 0 && now < artist.lastAttemptAt + BACKOFF_MS[Math.min(artist.failures, BACKOFF_MS.length) - 1];
|
|
695
721
|
}
|
|
696
722
|
status() {
|
|
697
|
-
const month =
|
|
723
|
+
const month = this.period();
|
|
698
724
|
const composer = this.composer();
|
|
699
725
|
const why = !this.settings.enabled ? "the label is switched off"
|
|
700
726
|
: this.settings.pausedReason
|
|
@@ -709,6 +735,7 @@ export class AiLabel {
|
|
|
709
735
|
recording: [...this.claims.values()].map((one) => one.label),
|
|
710
736
|
month,
|
|
711
737
|
secondsThisMonth: this.usage[month] ?? 0,
|
|
738
|
+
resetsAt: nextReset(this.now(), this.settings.resetDay ?? 1),
|
|
712
739
|
settings: this.settings,
|
|
713
740
|
waiting: why,
|
|
714
741
|
roster: Object.entries(ROSTER).map(([key, one]) => ({ key, name: one.name, genre: one.genre, signed: this.list().some((artist) => artist.name === one.name) })),
|
|
@@ -771,6 +798,9 @@ export class AiLabel {
|
|
|
771
798
|
const list = Array.isArray(input["genreOrder"]) ? input["genreOrder"] : String(input["genreOrder"]).split(",");
|
|
772
799
|
this.settings.genreOrder = list.map((one) => clean(one, 40)).filter(Boolean).slice(0, 30);
|
|
773
800
|
}
|
|
801
|
+
const resetDay = whole("resetDay", 1, 28);
|
|
802
|
+
if (resetDay !== undefined)
|
|
803
|
+
this.settings.resetDay = resetDay;
|
|
774
804
|
if (input["resume"] === true)
|
|
775
805
|
this.settings.pausedReason = "";
|
|
776
806
|
this.save();
|
|
@@ -1082,6 +1112,13 @@ export class AiLabel {
|
|
|
1082
1112
|
* so two never make the same one.
|
|
1083
1113
|
*/
|
|
1084
1114
|
async tick(limit = 200) {
|
|
1115
|
+
// Out of credit last budget month: a new one has its credit again.
|
|
1116
|
+
if (this.settings.pausedReason && this.settings.pausedPeriod && this.settings.pausedPeriod !== this.period()) {
|
|
1117
|
+
this.log(`a new budget month (${this.period()}): composing again`);
|
|
1118
|
+
this.settings.pausedReason = "";
|
|
1119
|
+
delete this.settings.pausedPeriod;
|
|
1120
|
+
this.save();
|
|
1121
|
+
}
|
|
1085
1122
|
if (this.running || !this.settings.enabled || this.settings.pausedReason)
|
|
1086
1123
|
return;
|
|
1087
1124
|
this.running = true;
|
|
@@ -1221,8 +1258,10 @@ export class AiLabel {
|
|
|
1221
1258
|
artist.lastAttemptAt = this.now();
|
|
1222
1259
|
artist.failures += 1;
|
|
1223
1260
|
artist.lastError = error.message;
|
|
1224
|
-
if (error instanceof OutOfCredit)
|
|
1225
|
-
this.settings.pausedReason = `${artist.lastError};
|
|
1261
|
+
if (error instanceof OutOfCredit) {
|
|
1262
|
+
this.settings.pausedReason = `${artist.lastError}; resumes by itself when the budget month renews (day ${this.settings.resetDay}), or \`nixamp station label resume\``;
|
|
1263
|
+
this.settings.pausedPeriod = this.period();
|
|
1264
|
+
}
|
|
1226
1265
|
this.save();
|
|
1227
1266
|
this.log(`${artist.name}: ${artist.lastError}`);
|
|
1228
1267
|
}
|
|
@@ -1243,7 +1282,7 @@ export class AiLabel {
|
|
|
1243
1282
|
this.log(`composing "${song.title}" (${artist.name}, ${album.title}, ${song.seconds} s, ${composer.name})`);
|
|
1244
1283
|
const prompt = `${artist.sound}. ${song.style}. Lead vocal: ${artist.voice}. Sung in English.`.slice(0, 1500);
|
|
1245
1284
|
await composer.compose({ prompt, seconds: song.seconds, vocals: true, out: raw, lyrics: song.lyrics });
|
|
1246
|
-
const month =
|
|
1285
|
+
const month = this.period();
|
|
1247
1286
|
this.usage[month] = (this.usage[month] ?? 0) + song.seconds;
|
|
1248
1287
|
const base = songBase(song);
|
|
1249
1288
|
const file = join(album.folder, `${base}.mp3`);
|
package/dist/station-cli.js
CHANGED
|
@@ -449,7 +449,8 @@ async function labelCommand(argv, call, show) {
|
|
|
449
449
|
return [
|
|
450
450
|
`${String(one["name"])} [${String(one["key"])}] ${String(one["genre"])}${one["enabled"] ? "" : " (off)"}`,
|
|
451
451
|
...albums.map((album) => ` ${String(album["year"])} ${String(album["title"])} ${String(album["composed"])}/${String(album["songs"])} songs${album["doneAt"] ? "" : " (recording)"}`),
|
|
452
|
-
|
|
452
|
+
// On the daily schedule an enabled artist has no date of its own: it is in the daily draw.
|
|
453
|
+
` next album ${Number(one["nextAlbumAt"] ?? -1) === -1 && one["enabled"] ? "in the daily draw (one album a day across the label)" : when(Number(one["nextAlbumAt"] ?? -1))}`,
|
|
453
454
|
...(one["lastError"] ? [` problem ${String(one["lastError"])}`] : []),
|
|
454
455
|
].join("\n");
|
|
455
456
|
};
|
|
@@ -465,7 +466,7 @@ async function labelCommand(argv, call, show) {
|
|
|
465
466
|
`holder ${String(settings["holder"])}${settings["enabled"] ? "" : " (off)"}`,
|
|
466
467
|
`files ${String(body["root"])}/<genre>/<artist>/<year>-<album>/`,
|
|
467
468
|
`composer ${String(body["composer"] ?? "none")}; words by ${String(body["writer"] ?? "nobody (no model key)")}`,
|
|
468
|
-
`this month ${String(body["secondsThisMonth"])} of ${Number(settings["monthlySeconds"]) === 0 ? "unlimited" : String(settings["monthlySeconds"])} s${body["busy"] ? `; recording ${String(body["busy"])}` : ""}`,
|
|
469
|
+
`this month ${String(body["secondsThisMonth"])} of ${Number(settings["monthlySeconds"]) === 0 ? "unlimited" : String(settings["monthlySeconds"])} s, renews ${new Date(Number(body["resetsAt"] ?? 0)).toISOString().slice(0, 10)}${body["busy"] ? `; recording ${String(body["busy"])}` : ""}`,
|
|
469
470
|
`albums ${String(settings["songsPerAlbum"])} songs of ${String(settings["songSeconds"])} s; ${String(settings["seedAlbums"])} to start, then one every ${String(settings["everyDays"])} days; ${String(settings["parallel"] ?? 1)} at a time`,
|
|
470
471
|
`genres ${(settings["genreOrder"] ?? []).join(", ")} first`,
|
|
471
472
|
`after that ${Number(settings["albumsPerDay"] ?? 0) > 0 ? `${String(settings["albumsPerDay"])} album a day, a new artist ${Math.round(Number(settings["newArtistChance"] ?? 0) * 100)}% of the time` : `one per artist every ${String(settings["everyDays"])} days`}`,
|
|
@@ -536,6 +537,7 @@ async function labelCommand(argv, call, show) {
|
|
|
536
537
|
albumsPerDay: number("--per-day"),
|
|
537
538
|
videos: has(argv, "--no-videos") ? false : has(argv, "--videos") ? true : undefined,
|
|
538
539
|
newArtistChance: number("--new-artists"),
|
|
540
|
+
resetDay: number("--reset-day"),
|
|
539
541
|
genreOrder: flag(argv, "--genres"),
|
|
540
542
|
enabled: has(argv, "--off") ? false : has(argv, "--on") ? true : undefined,
|
|
541
543
|
publish: has(argv, "--unlisted") ? false : has(argv, "--public") ? true : undefined,
|
package/dist/station-mcp.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export declare const STATION_TOOLS: ({
|
|
|
49
49
|
parallel?: undefined;
|
|
50
50
|
albumsPerDay?: undefined;
|
|
51
51
|
newArtistChance?: undefined;
|
|
52
|
+
resetDay?: undefined;
|
|
52
53
|
genreOrder?: undefined;
|
|
53
54
|
state?: undefined;
|
|
54
55
|
reason?: undefined;
|
|
@@ -124,6 +125,7 @@ export declare const STATION_TOOLS: ({
|
|
|
124
125
|
parallel?: undefined;
|
|
125
126
|
albumsPerDay?: undefined;
|
|
126
127
|
newArtistChance?: undefined;
|
|
128
|
+
resetDay?: undefined;
|
|
127
129
|
genreOrder?: undefined;
|
|
128
130
|
state?: undefined;
|
|
129
131
|
reason?: undefined;
|
|
@@ -222,6 +224,7 @@ export declare const STATION_TOOLS: ({
|
|
|
222
224
|
parallel?: undefined;
|
|
223
225
|
albumsPerDay?: undefined;
|
|
224
226
|
newArtistChance?: undefined;
|
|
227
|
+
resetDay?: undefined;
|
|
225
228
|
genreOrder?: undefined;
|
|
226
229
|
state?: undefined;
|
|
227
230
|
reason?: undefined;
|
|
@@ -317,6 +320,7 @@ export declare const STATION_TOOLS: ({
|
|
|
317
320
|
parallel?: undefined;
|
|
318
321
|
albumsPerDay?: undefined;
|
|
319
322
|
newArtistChance?: undefined;
|
|
323
|
+
resetDay?: undefined;
|
|
320
324
|
genreOrder?: undefined;
|
|
321
325
|
state?: undefined;
|
|
322
326
|
reason?: undefined;
|
|
@@ -394,6 +398,7 @@ export declare const STATION_TOOLS: ({
|
|
|
394
398
|
parallel?: undefined;
|
|
395
399
|
albumsPerDay?: undefined;
|
|
396
400
|
newArtistChance?: undefined;
|
|
401
|
+
resetDay?: undefined;
|
|
397
402
|
genreOrder?: undefined;
|
|
398
403
|
state?: undefined;
|
|
399
404
|
reason?: undefined;
|
|
@@ -478,6 +483,7 @@ export declare const STATION_TOOLS: ({
|
|
|
478
483
|
parallel?: undefined;
|
|
479
484
|
albumsPerDay?: undefined;
|
|
480
485
|
newArtistChance?: undefined;
|
|
486
|
+
resetDay?: undefined;
|
|
481
487
|
genreOrder?: undefined;
|
|
482
488
|
state?: undefined;
|
|
483
489
|
reason?: undefined;
|
|
@@ -562,6 +568,7 @@ export declare const STATION_TOOLS: ({
|
|
|
562
568
|
parallel?: undefined;
|
|
563
569
|
albumsPerDay?: undefined;
|
|
564
570
|
newArtistChance?: undefined;
|
|
571
|
+
resetDay?: undefined;
|
|
565
572
|
genreOrder?: undefined;
|
|
566
573
|
state?: undefined;
|
|
567
574
|
reason?: undefined;
|
|
@@ -663,6 +670,7 @@ export declare const STATION_TOOLS: ({
|
|
|
663
670
|
parallel?: undefined;
|
|
664
671
|
albumsPerDay?: undefined;
|
|
665
672
|
newArtistChance?: undefined;
|
|
673
|
+
resetDay?: undefined;
|
|
666
674
|
genreOrder?: undefined;
|
|
667
675
|
state?: undefined;
|
|
668
676
|
reason?: undefined;
|
|
@@ -781,6 +789,10 @@ export declare const STATION_TOOLS: ({
|
|
|
781
789
|
type: string;
|
|
782
790
|
description: string;
|
|
783
791
|
};
|
|
792
|
+
resetDay: {
|
|
793
|
+
type: string;
|
|
794
|
+
description: string;
|
|
795
|
+
};
|
|
784
796
|
genreOrder: {
|
|
785
797
|
type: string;
|
|
786
798
|
items: {
|
|
@@ -851,6 +863,7 @@ export declare const STATION_TOOLS: ({
|
|
|
851
863
|
parallel?: undefined;
|
|
852
864
|
albumsPerDay?: undefined;
|
|
853
865
|
newArtistChance?: undefined;
|
|
866
|
+
resetDay?: undefined;
|
|
854
867
|
genreOrder?: undefined;
|
|
855
868
|
server: {
|
|
856
869
|
type: "string";
|
|
@@ -944,6 +957,7 @@ export declare const STATION_TOOLS: ({
|
|
|
944
957
|
parallel?: undefined;
|
|
945
958
|
albumsPerDay?: undefined;
|
|
946
959
|
newArtistChance?: undefined;
|
|
960
|
+
resetDay?: undefined;
|
|
947
961
|
genreOrder?: undefined;
|
|
948
962
|
state?: undefined;
|
|
949
963
|
reason?: undefined;
|
|
@@ -1039,6 +1053,7 @@ export declare const STATION_TOOLS: ({
|
|
|
1039
1053
|
parallel?: undefined;
|
|
1040
1054
|
albumsPerDay?: undefined;
|
|
1041
1055
|
newArtistChance?: undefined;
|
|
1056
|
+
resetDay?: undefined;
|
|
1042
1057
|
genreOrder?: undefined;
|
|
1043
1058
|
state?: undefined;
|
|
1044
1059
|
reason?: undefined;
|
package/dist/station-mcp.js
CHANGED
|
@@ -121,6 +121,7 @@ export const STATION_TOOLS = [
|
|
|
121
121
|
songsPerAlbum: { type: "integer" }, songSeconds: { type: "integer" }, parallel: { type: "integer" },
|
|
122
122
|
albumsPerDay: { type: "integer", description: "After the first sweep: new albums a day, by a random artist or a newly invented one." },
|
|
123
123
|
newArtistChance: { type: "number", description: "0-1: how often the day's album is by a new artist." },
|
|
124
|
+
resetDay: { type: "integer", description: "Day of the month (1-28) the budget renews: the music provider's billing day." },
|
|
124
125
|
genreOrder: { type: "array", items: STRING, description: "Genres whose artists get albums first, in order." },
|
|
125
126
|
},
|
|
126
127
|
},
|
|
@@ -240,7 +241,7 @@ export async function callStationTool(name, args, options = {}) {
|
|
|
240
241
|
const key = typeof args["key"] === "string" && /^[a-f0-9]{10}$/.test(args["key"]) ? args["key"] : "";
|
|
241
242
|
const answer = action === "status" ? await call("GET", "/api/v1/stations/label")
|
|
242
243
|
: action === "sign" ? await call("POST", "/api/v1/stations/label/artists", pick(["preset", "roster", "name", "genre", "sound", "voice", "bio", "themes", "enabled"]))
|
|
243
|
-
: action === "configure" ? await call("POST", "/api/v1/stations/label", pick(["holder", "monthlySeconds", "everyDays", "seedAlbums", "songsPerAlbum", "songSeconds", "parallel", "genreOrder", "albumsPerDay", "newArtistChance", "enabled", "publish"]))
|
|
244
|
+
: action === "configure" ? await call("POST", "/api/v1/stations/label", pick(["holder", "monthlySeconds", "everyDays", "seedAlbums", "songsPerAlbum", "songSeconds", "parallel", "genreOrder", "albumsPerDay", "newArtistChance", "resetDay", "enabled", "publish"]))
|
|
244
245
|
: action === "run" ? await call("POST", "/api/v1/stations/label/run", {})
|
|
245
246
|
: action === "resume" ? await call("POST", "/api/v1/stations/label", { resume: true })
|
|
246
247
|
: !key ? null
|
package/dist/station-usage.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** `nixamp station` usage, apart so `nixamp help station` does not load the client. */
|
|
2
|
-
export declare const USAGE = "nixamp station \u2014 make a collection into a station\n\n nixamp station list\n nixamp station create --name NAME (--folder PATH | --playlist ID | --items 0,1,2) [--shuffle] [--no-repeat] [--bitrate 128] [--breaks 600 (the default; 0 for none)]\n nixamp station show ID\n nixamp station status ID\n nixamp station start ID\n nixamp station stop ID\n nixamp station skip ID\n nixamp station breaks ID SECONDS a spot between entries every SECONDS (120..86400; --off for none)\n nixamp station retry ID try every left-out file again\n nixamp station publish ID --basis owned|permission|licensed|public-domain [--note TEXT] [--unlisted] [--no-list]\n nixamp station unpublish ID [--private]\n nixamp station link ID [--rotate]\n nixamp station delete ID\n nixamp station guide-host NAME [--remove]\n NAME's front page is the public station guide (e.g. a Moshpit name)\n nixamp station guide-ads [--site ID] [--slot ID] [--format banner_300x250|text_link] [--off]\n crawlproof analytics (project ID) and an ad unit (slot ID) on the guide\n nixamp station guide-peer URL [--remove]\n the guide also lists the public, listed stations of the server at URL\n nixamp station auto [--no-video] [--min 10] [--films 3] [--tv 2] [--breaks 600] [--no-start]\n a station per genre, kept in step with the library (--off stops it)\n\n AI radio (music composed for a station, a few tracks a day):\n nixamp station ai what is composing, this month's seconds, the stations\n nixamp station ai create (--preset lofi|synthwave|ambient|chiptune|punk|jazz | --name NAME --style TEXT)\n [--vocals] [--seconds 120] [--per-day 2] [--unlisted] public on the guide unless --unlisted\n nixamp station ai generate KEY compose one now\n nixamp station ai set KEY [--style TEXT] [--per-day N] [--seconds N] [--off|--on]\n nixamp station ai remove KEY [--files]\n nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)\n nixamp station ai resume after the provider ran out of credit\n nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,\n NIXAMP_OPENAI_URL | NIXAMP_OPENAI_MODEL (an OpenAI-compatible stand-in),\n NIXAMP_MUSIC_MODEL (music_v1|music_v2|music_v2_5), from stdin\n\n AI label (AI artists who release albums on their own; a station per genre; the catalogue at /label):\n nixamp station label artists, albums, this month's seconds, what it is waiting for\n nixamp station label sign --roster the roster: three artists in each of Rock, Hip-Hop, Synthwave, Country,\n Metal and Pop (nixamp station label lists their keys)\n nixamp station label sign (--preset KEY | --name NAME --genre GENRE --sound TEXT [--voice TEXT] [--bio TEXT] [--themes TEXT])\n nixamp station label album KEY plan the artist's next album now and record it\n nixamp station label set KEY [--sound TEXT] [--voice TEXT] [--bio TEXT] [--themes TEXT] [--off|--on]\n nixamp station label drop KEY [--files]\n nixamp station label config [--holder \"Profullstack, Inc.\"] [--budget SECONDS] [--every-days 30] [--seed-albums 1]\n [--songs 8] [--seconds 150] [--on|--off] [--public|--unlisted]\n [--parallel 4] [--genres \"Punk,Blues,Country\"] songs made at once; genres first\n [--per-day 1] [--new-artists 0.25] after the first sweep: albums a day, share by new artists\n [--videos|--no-videos] a music video per song and a TV station of them\n nixamp station label run record whatever is due now\n nixamp station label resume after the provider ran out of credit\n\n Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):\n nixamp station shares the setting and what is waiting\n nixamp station shares on [--owner-moderation] [--unlisted] [--max-mb 60] [--per-hour 6]\n nixamp station shares off\n nixamp station shares list [--state held|approved|reported|rejected]\n nixamp station shares approve|reject|delete SHARE\n nixamp station shares trust ADDRESS [--remove] believe this proxy's X-Forwarded-For\n\n Lyrics (shown on the station page from each file's own tag, else nichedb.dev; ours published back):\n nixamp station lyrics the key, what was published, which stations may publish\n nixamp station lyrics publish ID publish a station's words now (public, listed, basis owned only)\n nixamp station lyrics key nichedb's key (NIXAMP_LYRICS_KEY), from stdin (--clear forgets it)\n\n Copyright holders (the now-playing card: who holds a track's copyright, and how to support them):\n nixamp station holder list\n nixamp station holder set NAME [--artist ARTIST]... [--station ID]... [--support https://...] [--label Subscribe] [--license TEXT]\n nixamp station holder remove ID\n\n --json machine-readable output\n --url, --key another server, as with `nixamp admin`\n\nA new station is private and stopped. Starting it does not publish it.";
|
|
2
|
+
export declare const USAGE = "nixamp station \u2014 make a collection into a station\n\n nixamp station list\n nixamp station create --name NAME (--folder PATH | --playlist ID | --items 0,1,2) [--shuffle] [--no-repeat] [--bitrate 128] [--breaks 600 (the default; 0 for none)]\n nixamp station show ID\n nixamp station status ID\n nixamp station start ID\n nixamp station stop ID\n nixamp station skip ID\n nixamp station breaks ID SECONDS a spot between entries every SECONDS (120..86400; --off for none)\n nixamp station retry ID try every left-out file again\n nixamp station publish ID --basis owned|permission|licensed|public-domain [--note TEXT] [--unlisted] [--no-list]\n nixamp station unpublish ID [--private]\n nixamp station link ID [--rotate]\n nixamp station delete ID\n nixamp station guide-host NAME [--remove]\n NAME's front page is the public station guide (e.g. a Moshpit name)\n nixamp station guide-ads [--site ID] [--slot ID] [--format banner_300x250|text_link] [--off]\n crawlproof analytics (project ID) and an ad unit (slot ID) on the guide\n nixamp station guide-peer URL [--remove]\n the guide also lists the public, listed stations of the server at URL\n nixamp station auto [--no-video] [--min 10] [--films 3] [--tv 2] [--breaks 600] [--no-start]\n a station per genre, kept in step with the library (--off stops it)\n\n AI radio (music composed for a station, a few tracks a day):\n nixamp station ai what is composing, this month's seconds, the stations\n nixamp station ai create (--preset lofi|synthwave|ambient|chiptune|punk|jazz | --name NAME --style TEXT)\n [--vocals] [--seconds 120] [--per-day 2] [--unlisted] public on the guide unless --unlisted\n nixamp station ai generate KEY compose one now\n nixamp station ai set KEY [--style TEXT] [--per-day N] [--seconds N] [--off|--on]\n nixamp station ai remove KEY [--files]\n nixamp station ai budget SECONDS seconds of music a month across AI stations (0: no cap)\n nixamp station ai resume after the provider ran out of credit\n nixamp station ai key NAME ELEVENLABS_API_KEY | GEMINI_API_KEY | OPENAI_API_KEY | ANTHROPIC_API_KEY,\n NIXAMP_OPENAI_URL | NIXAMP_OPENAI_MODEL (an OpenAI-compatible stand-in),\n NIXAMP_MUSIC_MODEL (music_v1|music_v2|music_v2_5), from stdin\n\n AI label (AI artists who release albums on their own; a station per genre; the catalogue at /label):\n nixamp station label artists, albums, this month's seconds, what it is waiting for\n nixamp station label sign --roster the roster: three artists in each of Rock, Hip-Hop, Synthwave, Country,\n Metal and Pop (nixamp station label lists their keys)\n nixamp station label sign (--preset KEY | --name NAME --genre GENRE --sound TEXT [--voice TEXT] [--bio TEXT] [--themes TEXT])\n nixamp station label album KEY plan the artist's next album now and record it\n nixamp station label set KEY [--sound TEXT] [--voice TEXT] [--bio TEXT] [--themes TEXT] [--off|--on]\n nixamp station label drop KEY [--files]\n nixamp station label config [--holder \"Profullstack, Inc.\"] [--budget SECONDS] [--every-days 30] [--seed-albums 1]\n [--songs 8] [--seconds 150] [--on|--off] [--public|--unlisted]\n [--parallel 4] [--genres \"Punk,Blues,Country\"] songs made at once; genres first\n [--per-day 1] [--new-artists 0.25] after the first sweep: albums a day, share by new artists\n [--videos|--no-videos] a music video per song and a TV station of them\n [--reset-day 21] the day the monthly budget renews (the provider's billing day)\n nixamp station label run record whatever is due now\n nixamp station label resume after the provider ran out of credit\n\n Listener shares (anybody shares an MP3 link or file from the guide; AI files and checks it):\n nixamp station shares the setting and what is waiting\n nixamp station shares on [--owner-moderation] [--unlisted] [--max-mb 60] [--per-hour 6]\n nixamp station shares off\n nixamp station shares list [--state held|approved|reported|rejected]\n nixamp station shares approve|reject|delete SHARE\n nixamp station shares trust ADDRESS [--remove] believe this proxy's X-Forwarded-For\n\n Lyrics (shown on the station page from each file's own tag, else nichedb.dev; ours published back):\n nixamp station lyrics the key, what was published, which stations may publish\n nixamp station lyrics publish ID publish a station's words now (public, listed, basis owned only)\n nixamp station lyrics key nichedb's key (NIXAMP_LYRICS_KEY), from stdin (--clear forgets it)\n\n Copyright holders (the now-playing card: who holds a track's copyright, and how to support them):\n nixamp station holder list\n nixamp station holder set NAME [--artist ARTIST]... [--station ID]... [--support https://...] [--label Subscribe] [--license TEXT]\n nixamp station holder remove ID\n\n --json machine-readable output\n --url, --key another server, as with `nixamp admin`\n\nA new station is private and stopped. Starting it does not publish it.";
|
package/dist/station-usage.js
CHANGED
|
@@ -49,6 +49,7 @@ export const USAGE = `nixamp station — make a collection into a station
|
|
|
49
49
|
[--parallel 4] [--genres "Punk,Blues,Country"] songs made at once; genres first
|
|
50
50
|
[--per-day 1] [--new-artists 0.25] after the first sweep: albums a day, share by new artists
|
|
51
51
|
[--videos|--no-videos] a music video per song and a TV station of them
|
|
52
|
+
[--reset-day 21] the day the monthly budget renews (the provider's billing day)
|
|
52
53
|
nixamp station label run record whatever is due now
|
|
53
54
|
nixamp station label resume after the provider ran out of credit
|
|
54
55
|
|
package/package.json
CHANGED
package/src/ai-label.ts
CHANGED
|
@@ -131,7 +131,11 @@ export interface LabelSettings {
|
|
|
131
131
|
parallel: number;
|
|
132
132
|
/** Genres whose artists get their albums first, in this order. */
|
|
133
133
|
genreOrder: string[];
|
|
134
|
-
/**
|
|
134
|
+
/** The day of the month the budget renews (the provider's billing day), 1-28. */
|
|
135
|
+
resetDay: number;
|
|
136
|
+
/** The budget month a pause for lack of credit began in: a new month lifts it. */
|
|
137
|
+
pausedPeriod?: string;
|
|
138
|
+
/** Set by a provider that is out of credit; cleared by `resume`, or by the next budget month. */
|
|
135
139
|
pausedReason: string;
|
|
136
140
|
}
|
|
137
141
|
|
|
@@ -365,6 +369,7 @@ export const DEFAULTS: Omit<LabelSettings, "pausedReason"> = {
|
|
|
365
369
|
holder: "Profullstack, Inc.",
|
|
366
370
|
enabled: true,
|
|
367
371
|
monthlySeconds: 3600,
|
|
372
|
+
resetDay: 1,
|
|
368
373
|
everyDays: 30,
|
|
369
374
|
albumsPerDay: 1,
|
|
370
375
|
newArtistChance: 0.25,
|
|
@@ -710,8 +715,27 @@ function tagFile(ffmpeg: string[], from: string, to: string, tags: Record<string
|
|
|
710
715
|
});
|
|
711
716
|
}
|
|
712
717
|
|
|
713
|
-
|
|
714
|
-
|
|
718
|
+
/**
|
|
719
|
+
* The budget month `at` falls in, as "YYYY-MM" of the month it started in:
|
|
720
|
+
* months run from `resetDay` (the provider's billing day, so the cap and the
|
|
721
|
+
* credits renew together) to the same day of the next month.
|
|
722
|
+
*/
|
|
723
|
+
export function periodOf(at: number, resetDay = 1): string {
|
|
724
|
+
const date = new Date(at);
|
|
725
|
+
let year = date.getUTCFullYear();
|
|
726
|
+
let month = date.getUTCMonth();
|
|
727
|
+
if (date.getUTCDate() < resetDay) {
|
|
728
|
+
month -= 1;
|
|
729
|
+
if (month < 0) { month = 11; year -= 1; }
|
|
730
|
+
}
|
|
731
|
+
return `${year}-${String(month + 1).padStart(2, "0")}`;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** When the budget month after `at` begins. */
|
|
735
|
+
export function nextReset(at: number, resetDay = 1): number {
|
|
736
|
+
const date = new Date(at);
|
|
737
|
+
const thisMonth = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), resetDay);
|
|
738
|
+
return date.getUTCDate() < resetDay ? thisMonth : Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, resetDay);
|
|
715
739
|
}
|
|
716
740
|
|
|
717
741
|
export interface AiLabelDeps {
|
|
@@ -835,9 +859,14 @@ export class AiLabel {
|
|
|
835
859
|
return this.settings.holder;
|
|
836
860
|
}
|
|
837
861
|
|
|
862
|
+
/** The budget month now, renewing on resetDay. */
|
|
863
|
+
private period(): string {
|
|
864
|
+
return periodOf(this.now(), this.settings.resetDay ?? 1);
|
|
865
|
+
}
|
|
866
|
+
|
|
838
867
|
private budgetLeft(): number {
|
|
839
868
|
if (this.settings.monthlySeconds === 0) return Number.POSITIVE_INFINITY;
|
|
840
|
-
return this.settings.monthlySeconds - (this.usage[
|
|
869
|
+
return this.settings.monthlySeconds - (this.usage[this.period()] ?? 0);
|
|
841
870
|
}
|
|
842
871
|
|
|
843
872
|
/** When this artist's next album is due: its first ones at once, then every `everyDays`, staggered by artist. */
|
|
@@ -856,7 +885,7 @@ export class AiLabel {
|
|
|
856
885
|
}
|
|
857
886
|
|
|
858
887
|
status(): Record<string, unknown> {
|
|
859
|
-
const month =
|
|
888
|
+
const month = this.period();
|
|
860
889
|
const composer = this.composer();
|
|
861
890
|
const why = !this.settings.enabled ? "the label is switched off"
|
|
862
891
|
: this.settings.pausedReason
|
|
@@ -871,6 +900,7 @@ export class AiLabel {
|
|
|
871
900
|
recording: [...this.claims.values()].map((one) => one.label),
|
|
872
901
|
month,
|
|
873
902
|
secondsThisMonth: this.usage[month] ?? 0,
|
|
903
|
+
resetsAt: nextReset(this.now(), this.settings.resetDay ?? 1),
|
|
874
904
|
settings: this.settings,
|
|
875
905
|
waiting: why,
|
|
876
906
|
roster: Object.entries(ROSTER).map(([key, one]) => ({ key, name: one.name, genre: one.genre, signed: this.list().some((artist) => artist.name === one.name) })),
|
|
@@ -920,6 +950,8 @@ export class AiLabel {
|
|
|
920
950
|
const list = Array.isArray(input["genreOrder"]) ? input["genreOrder"] : String(input["genreOrder"]).split(",");
|
|
921
951
|
this.settings.genreOrder = list.map((one) => clean(one, 40)).filter(Boolean).slice(0, 30);
|
|
922
952
|
}
|
|
953
|
+
const resetDay = whole("resetDay", 1, 28);
|
|
954
|
+
if (resetDay !== undefined) this.settings.resetDay = resetDay;
|
|
923
955
|
if (input["resume"] === true) this.settings.pausedReason = "";
|
|
924
956
|
this.save();
|
|
925
957
|
if (this.settings.enabled) void this.tick();
|
|
@@ -1209,6 +1241,13 @@ export class AiLabel {
|
|
|
1209
1241
|
* so two never make the same one.
|
|
1210
1242
|
*/
|
|
1211
1243
|
async tick(limit = 200): Promise<void> {
|
|
1244
|
+
// Out of credit last budget month: a new one has its credit again.
|
|
1245
|
+
if (this.settings.pausedReason && this.settings.pausedPeriod && this.settings.pausedPeriod !== this.period()) {
|
|
1246
|
+
this.log(`a new budget month (${this.period()}): composing again`);
|
|
1247
|
+
this.settings.pausedReason = "";
|
|
1248
|
+
delete this.settings.pausedPeriod;
|
|
1249
|
+
this.save();
|
|
1250
|
+
}
|
|
1212
1251
|
if (this.running || !this.settings.enabled || this.settings.pausedReason) return;
|
|
1213
1252
|
this.running = true;
|
|
1214
1253
|
let steps = 0;
|
|
@@ -1333,7 +1372,10 @@ export class AiLabel {
|
|
|
1333
1372
|
artist.lastAttemptAt = this.now();
|
|
1334
1373
|
artist.failures += 1;
|
|
1335
1374
|
artist.lastError = (error as Error).message;
|
|
1336
|
-
if (error instanceof OutOfCredit)
|
|
1375
|
+
if (error instanceof OutOfCredit) {
|
|
1376
|
+
this.settings.pausedReason = `${artist.lastError}; resumes by itself when the budget month renews (day ${this.settings.resetDay}), or \`nixamp station label resume\``;
|
|
1377
|
+
this.settings.pausedPeriod = this.period();
|
|
1378
|
+
}
|
|
1337
1379
|
this.save();
|
|
1338
1380
|
this.log(`${artist.name}: ${artist.lastError}`);
|
|
1339
1381
|
}
|
|
@@ -1355,7 +1397,7 @@ export class AiLabel {
|
|
|
1355
1397
|
this.log(`composing "${song.title}" (${artist.name}, ${album.title}, ${song.seconds} s, ${composer.name})`);
|
|
1356
1398
|
const prompt = `${artist.sound}. ${song.style}. Lead vocal: ${artist.voice}. Sung in English.`.slice(0, 1500);
|
|
1357
1399
|
await composer.compose({ prompt, seconds: song.seconds, vocals: true, out: raw, lyrics: song.lyrics });
|
|
1358
|
-
const month =
|
|
1400
|
+
const month = this.period();
|
|
1359
1401
|
this.usage[month] = (this.usage[month] ?? 0) + song.seconds;
|
|
1360
1402
|
const base = songBase(song);
|
|
1361
1403
|
const file = join(album.folder, `${base}.mp3`);
|
package/src/station-cli.ts
CHANGED
|
@@ -423,7 +423,8 @@ async function labelCommand(argv: string[], call: Call, show: Show): Promise<num
|
|
|
423
423
|
return [
|
|
424
424
|
`${String(one["name"])} [${String(one["key"])}] ${String(one["genre"])}${one["enabled"] ? "" : " (off)"}`,
|
|
425
425
|
...albums.map((album) => ` ${String(album["year"])} ${String(album["title"])} ${String(album["composed"])}/${String(album["songs"])} songs${album["doneAt"] ? "" : " (recording)"}`),
|
|
426
|
-
|
|
426
|
+
// On the daily schedule an enabled artist has no date of its own: it is in the daily draw.
|
|
427
|
+
` next album ${Number(one["nextAlbumAt"] ?? -1) === -1 && one["enabled"] ? "in the daily draw (one album a day across the label)" : when(Number(one["nextAlbumAt"] ?? -1))}`,
|
|
427
428
|
...(one["lastError"] ? [` problem ${String(one["lastError"])}`] : []),
|
|
428
429
|
].join("\n");
|
|
429
430
|
};
|
|
@@ -439,7 +440,7 @@ async function labelCommand(argv: string[], call: Call, show: Show): Promise<num
|
|
|
439
440
|
`holder ${String(settings["holder"])}${settings["enabled"] ? "" : " (off)"}`,
|
|
440
441
|
`files ${String(body["root"])}/<genre>/<artist>/<year>-<album>/`,
|
|
441
442
|
`composer ${String(body["composer"] ?? "none")}; words by ${String(body["writer"] ?? "nobody (no model key)")}`,
|
|
442
|
-
`this month ${String(body["secondsThisMonth"])} of ${Number(settings["monthlySeconds"]) === 0 ? "unlimited" : String(settings["monthlySeconds"])} s${body["busy"] ? `; recording ${String(body["busy"])}` : ""}`,
|
|
443
|
+
`this month ${String(body["secondsThisMonth"])} of ${Number(settings["monthlySeconds"]) === 0 ? "unlimited" : String(settings["monthlySeconds"])} s, renews ${new Date(Number(body["resetsAt"] ?? 0)).toISOString().slice(0, 10)}${body["busy"] ? `; recording ${String(body["busy"])}` : ""}`,
|
|
443
444
|
`albums ${String(settings["songsPerAlbum"])} songs of ${String(settings["songSeconds"])} s; ${String(settings["seedAlbums"])} to start, then one every ${String(settings["everyDays"])} days; ${String(settings["parallel"] ?? 1)} at a time`,
|
|
444
445
|
`genres ${((settings["genreOrder"] as string[] | undefined) ?? []).join(", ")} first`,
|
|
445
446
|
`after that ${Number(settings["albumsPerDay"] ?? 0) > 0 ? `${String(settings["albumsPerDay"])} album a day, a new artist ${Math.round(Number(settings["newArtistChance"] ?? 0) * 100)}% of the time` : `one per artist every ${String(settings["everyDays"])} days`}`,
|
|
@@ -502,6 +503,7 @@ async function labelCommand(argv: string[], call: Call, show: Show): Promise<num
|
|
|
502
503
|
albumsPerDay: number("--per-day"),
|
|
503
504
|
videos: has(argv, "--no-videos") ? false : has(argv, "--videos") ? true : undefined,
|
|
504
505
|
newArtistChance: number("--new-artists"),
|
|
506
|
+
resetDay: number("--reset-day"),
|
|
505
507
|
genreOrder: flag(argv, "--genres"),
|
|
506
508
|
enabled: has(argv, "--off") ? false : has(argv, "--on") ? true : undefined,
|
|
507
509
|
publish: has(argv, "--unlisted") ? false : has(argv, "--public") ? true : undefined,
|
package/src/station-mcp.ts
CHANGED
|
@@ -123,6 +123,7 @@ export const STATION_TOOLS = [
|
|
|
123
123
|
songsPerAlbum: { type: "integer" }, songSeconds: { type: "integer" }, parallel: { type: "integer" },
|
|
124
124
|
albumsPerDay: { type: "integer", description: "After the first sweep: new albums a day, by a random artist or a newly invented one." },
|
|
125
125
|
newArtistChance: { type: "number", description: "0-1: how often the day's album is by a new artist." },
|
|
126
|
+
resetDay: { type: "integer", description: "Day of the month (1-28) the budget renews: the music provider's billing day." },
|
|
126
127
|
genreOrder: { type: "array", items: STRING, description: "Genres whose artists get albums first, in order." },
|
|
127
128
|
},
|
|
128
129
|
},
|
|
@@ -253,7 +254,7 @@ export async function callStationTool(name: string, args: Record<string, unknown
|
|
|
253
254
|
const key = typeof args["key"] === "string" && /^[a-f0-9]{10}$/.test(args["key"]) ? args["key"] : "";
|
|
254
255
|
const answer = action === "status" ? await call("GET", "/api/v1/stations/label")
|
|
255
256
|
: action === "sign" ? await call("POST", "/api/v1/stations/label/artists", pick(["preset", "roster", "name", "genre", "sound", "voice", "bio", "themes", "enabled"]))
|
|
256
|
-
: action === "configure" ? await call("POST", "/api/v1/stations/label", pick(["holder", "monthlySeconds", "everyDays", "seedAlbums", "songsPerAlbum", "songSeconds", "parallel", "genreOrder", "albumsPerDay", "newArtistChance", "enabled", "publish"]))
|
|
257
|
+
: action === "configure" ? await call("POST", "/api/v1/stations/label", pick(["holder", "monthlySeconds", "everyDays", "seedAlbums", "songsPerAlbum", "songSeconds", "parallel", "genreOrder", "albumsPerDay", "newArtistChance", "resetDay", "enabled", "publish"]))
|
|
257
258
|
: action === "run" ? await call("POST", "/api/v1/stations/label/run", {})
|
|
258
259
|
: action === "resume" ? await call("POST", "/api/v1/stations/label", { resume: true })
|
|
259
260
|
: !key ? null
|
package/src/station-usage.ts
CHANGED
|
@@ -49,6 +49,7 @@ export const USAGE = `nixamp station — make a collection into a station
|
|
|
49
49
|
[--parallel 4] [--genres "Punk,Blues,Country"] songs made at once; genres first
|
|
50
50
|
[--per-day 1] [--new-artists 0.25] after the first sweep: albums a day, share by new artists
|
|
51
51
|
[--videos|--no-videos] a music video per song and a TV station of them
|
|
52
|
+
[--reset-day 21] the day the monthly budget renews (the provider's billing day)
|
|
52
53
|
nixamp station label run record whatever is due now
|
|
53
54
|
nixamp station label resume after the provider ran out of credit
|
|
54
55
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./main-
|
|
1
|
+
import{t as e}from"./main-D9-BuE2r.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-D9-BuE2r.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};
|