From 8fa2fd071f2714ea6f87373089f4db49d7c224a1 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Sun, 5 May 2024 03:22:29 -0400 Subject: [PATCH] Add public access option when creating playlist --- src/components/playlisteditor/playlisteditor.ts | 12 ++++++++++++ src/strings/en-us.json | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/components/playlisteditor/playlisteditor.ts b/src/components/playlisteditor/playlisteditor.ts index 45b41e82d65..54a5388c23e 100644 --- a/src/components/playlisteditor/playlisteditor.ts +++ b/src/components/playlisteditor/playlisteditor.ts @@ -79,6 +79,7 @@ function createPlaylist(dlg: DialogElement) { .createPlaylist({ createPlaylistDto: { Name: dlg.querySelector('#txtNewPlaylistName')?.value, + IsPublic: dlg.querySelector('#chkPlaylistPublic')?.checked, Ids: itemIds?.split(','), UserId: apiClient.getCurrentUserId() } @@ -197,6 +198,17 @@ function getEditorHtml(items: string[]) { html += ``; html += ''; + html += ` +
+ +
+ ${globalize.translate('PlaylistPublicDescription')} +
+
`; + // newPlaylistInfo html += ''; diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 7ac237d099e..47b0f9085b5 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1257,6 +1257,8 @@ "PlayCount": "Play count", "Played": "Played", "PlayFromBeginning": "Play from beginning", + "PlaylistPublic": "Allow public access", + "PlaylistPublicDescription": "Allow this playlist to be viewed by any logged in user.", "Playlists": "Playlists", "PlayNext": "Play next", "PlayNextEpisodeAutomatically": "Play next episode automatically",