Skip to content

Commit

Permalink
Add public access option when creating playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill committed May 5, 2024
1 parent 850ac38 commit 8fa2fd0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/playlisteditor/playlisteditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function createPlaylist(dlg: DialogElement) {
.createPlaylist({
createPlaylistDto: {
Name: dlg.querySelector<HTMLInputElement>('#txtNewPlaylistName')?.value,
IsPublic: dlg.querySelector<HTMLInputElement>('#chkPlaylistPublic')?.checked,
Ids: itemIds?.split(','),
UserId: apiClient.getCurrentUserId()
}
Expand Down Expand Up @@ -197,6 +198,17 @@ function getEditorHtml(items: string[]) {
html += `<input is="emby-input" type="text" id="txtNewPlaylistName" required="required" label="${globalize.translate('LabelName')}"${autoFocus} />`;
html += '</div>';

html += `
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkPlaylistPublic" />
<span>${globalize.translate('PlaylistPublic')}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">
${globalize.translate('PlaylistPublicDescription')}
</div>
</div>`;

// newPlaylistInfo
html += '</div>';

Expand Down
2 changes: 2 additions & 0 deletions src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8fa2fd0

Please sign in to comment.