1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Cleanup logs and make playlists public by default

This commit is contained in:
Bill Thornton 2024-05-06 03:10:52 -04:00
parent 6c226ba59f
commit bae48c4023
3 changed files with 8 additions and 5 deletions

View file

@ -170,8 +170,9 @@ function populatePlaylists(editorOptions: PlaylistEditorOptions, panel: DialogEl
...playlist, ...playlist,
permissions permissions
})) }))
.catch((err) => { .catch(err => {
console.warn('[PlaylistEditor] Failed to fetch playlist permissions', err); // If a user doesn't have access, then the request will 404 and throw
console.info('[PlaylistEditor] Failed to fetch playlist permissions', err);
return playlist; return playlist;
}); });
@ -231,7 +232,7 @@ function getEditorHtml(items: string[]) {
html += ` html += `
<div class="checkboxContainer checkboxContainer-withDescription"> <div class="checkboxContainer checkboxContainer-withDescription">
<label> <label>
<input type="checkbox" is="emby-checkbox" id="chkPlaylistPublic" /> <input type="checkbox" is="emby-checkbox" id="chkPlaylistPublic" checked />
<span>${globalize.translate('PlaylistPublic')}</span> <span>${globalize.translate('PlaylistPublic')}</span>
</label> </label>
<div class="fieldDescription checkboxFieldDescription"> <div class="fieldDescription checkboxFieldDescription">

View file

@ -128,8 +128,9 @@ function showContextMenu(card, options = {}) {
userId: apiClient.getCurrentUserId() userId: apiClient.getCurrentUserId()
}) })
.then(({ data }) => data) .then(({ data }) => data)
.catch(() => { .catch(err => {
// If a user doesn't have access, then the request will 404 and throw // If a user doesn't have access, then the request will 404 and throw
console.info('[Shortcuts] Failed to fetch playlist permissions', err);
return { CanEdit: false }; return { CanEdit: false };
}) : }) :
// Not a playlist item // Not a playlist item

View file

@ -39,8 +39,9 @@ async function init(page, item) {
playlistId: item.Id, playlistId: item.Id,
userId: apiClient.getCurrentUserId() userId: apiClient.getCurrentUserId()
}) })
.catch(() => { .catch(err => {
// If a user doesn't have access, then the request will 404 and throw // If a user doesn't have access, then the request will 404 and throw
console.info('[PlaylistViewer] Failed to fetch playlist permissions', err);
return { data: {} }; return { data: {} };
}); });
isEditable = !!data.CanEdit; isEditable = !!data.CanEdit;