feat: sane defaults for new playlists in the UI.

This commit is contained in:
redxef 2024-12-22 21:19:07 +01:00
parent 31f36b6f38
commit 8426d14500
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -71,17 +71,18 @@
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
if (id === null) {
selection.selectedIndex = 0;
editName.value = '';
editProgram.value = '';
editSortProgram.value = '';
editName.value = 'My New Smartplaylist';
editProgram.value = '(is-favourite)';
editSortProgram.value = '(begin *items*)';
editUsers.innerHTML = '';
for (const u of config.Users) {
var o = document.createElement('option');
o.value = u[0];
o.innerHTML = u[1];
o.setAttribute('selected', 'selected');
editUsers.appendChild(o);
}
editEnabled.checked = false;
editEnabled.checked = true;
return;
}
function matchId(p) {