From 8426d14500e57d77cc282b6aa2902f96e690394c Mon Sep 17 00:00:00 2001 From: redxef Date: Sun, 22 Dec 2024 21:19:07 +0100 Subject: [PATCH] feat: sane defaults for new playlists in the UI. --- Jellyfin.Plugin.SmartPlaylist/configPage.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Plugin.SmartPlaylist/configPage.html b/Jellyfin.Plugin.SmartPlaylist/configPage.html index 6cd4b47..cd597d2 100644 --- a/Jellyfin.Plugin.SmartPlaylist/configPage.html +++ b/Jellyfin.Plugin.SmartPlaylist/configPage.html @@ -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) {