Commit 6c2bf0b5 authored by Guillaume Lebigot's avatar Guillaume Lebigot

Fix getPlaylistContents with invisible playlists and guests.

parent 0751bcf1
Subproject commit 8618ff0052d6b15925d76f4e0cf99b5e8c7980f3
Subproject commit b97775c5825c075c755d2a2d884bce05b12835c2
......@@ -364,10 +364,10 @@ export async function getPlaylistContentsMini(playlist_id: number) {
/** Get playlist contents */
export async function getPlaylistContents(playlist_id: number, token: Token, filter: string, lang: string, from = 0, size = 99999999999, random = 0) {
const plInfo = await getPlaylistInfo(playlist_id, token);
try {
if (token.role !== 'admin' && !plInfo.flag_visible) throw `Playlist ${playlist_id} unknown`;
const plInfo = await getPlaylistInfo(playlist_id, token);
if (!plInfo) throw `Playlist ${playlist_id} unknown`;
const pl = await getPLContents({
playlist_id: playlist_id,
username: token.username,
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment