Add playlist queue handler

This commit is contained in:
jeffvli 2022-12-31 20:07:44 -08:00
parent aa1cd742ad
commit 5cef23944f
2 changed files with 42 additions and 21 deletions

View file

@ -93,10 +93,13 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
handlePlayQueueAdd?.({ byData: ctx.data, play });
break;
case LibraryItem.PLAYLIST:
handlePlayQueueAdd?.({
byItemType: { id: ctx.data.map((item) => item.id), type: ctx.type },
play,
});
for (const item of ctx.data) {
handlePlayQueueAdd?.({
byItemType: { id: [item.id], type: ctx.type },
play,
});
}
break;
}
};