Raise daily generation limit to 100 and fix limit UI coercion.
0 was misread as zero allowed on older servers; player no longer falls back to 10 when saving limits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-4
@@ -590,7 +590,7 @@
|
||||
Max new songs / day
|
||||
<span class="hint">Hard cap on Lyria generations</span>
|
||||
</label>
|
||||
<input type="number" class="num-input" id="setMaxPerDay" min="1" max="100" value="10">
|
||||
<input type="number" class="num-input" id="setMaxPerDay" min="0" max="200" value="100" title="0 = unlimited">
|
||||
</div>
|
||||
<div class="settings-divider">Lyria 3 (from API)</div>
|
||||
<div class="lyria-status ok" id="lyriaApiStatus">Checking Gemini / Lyria…</div>
|
||||
@@ -1052,7 +1052,8 @@
|
||||
new_song_chance: data.playback?.new_song_chance,
|
||||
});
|
||||
if (data.budget) {
|
||||
setMaxPerDay.value = data.budget.max_per_day || 10;
|
||||
const cap = data.limits?.max_new_songs_per_day ?? data.budget?.max_per_day;
|
||||
setMaxPerDay.value = cap === undefined || cap === null ? 100 : cap;
|
||||
}
|
||||
if (data.lyria) syncLyriaUI(data.lyria);
|
||||
updateModeBadge();
|
||||
@@ -1074,7 +1075,10 @@
|
||||
new_song_chance: setChance.value / 100,
|
||||
},
|
||||
limits: {
|
||||
max_new_songs_per_day: parseInt(setMaxPerDay.value, 10) || 10,
|
||||
max_new_songs_per_day: (() => {
|
||||
const n = parseInt(setMaxPerDay.value, 10);
|
||||
return Number.isFinite(n) && n >= 0 ? n : 100;
|
||||
})(),
|
||||
},
|
||||
lyria: {
|
||||
model: setLyriaModel.value,
|
||||
@@ -1098,7 +1102,8 @@
|
||||
statRemaining.textContent = `${data.budget.remaining ?? 0} remaining`;
|
||||
}
|
||||
const perTrack = data.costs?.per_track_estimate_usd || 0.082;
|
||||
statMaxBudget.textContent = fmtUsd(perTrack * (data.limits?.max_new_songs_per_day || 10));
|
||||
const cap = data.limits?.max_new_songs_per_day ?? 100;
|
||||
statMaxBudget.textContent = cap <= 0 ? '∞' : fmtUsd(perTrack * cap);
|
||||
} catch (_) {}
|
||||
savingSettings = false;
|
||||
}
|
||||
|
||||
|
Before
After
|
Reference in New Issue
Block a user