feat!: playlists

This commit is contained in:
2024-12-01 03:49:08 +01:00
parent 1a4bde9618
commit 2772abcd2f
40 changed files with 1530 additions and 69 deletions

View File

@@ -0,0 +1,19 @@
import type { Actions } from './$types';
import { protoTransport } from '../../../hooks.server';
import { PlayerClient } from '$lib/proto/player.client';
import { LibraryClient } from '$lib/proto/library.client';
export const actions = {
play: async ({ params }) => {
const client = new PlayerClient(protoTransport);
const _response = await client.playPlaylist({
id: parseInt(params.id)
});
},
delete: async ({ params }) => {
const client = new LibraryClient(protoTransport);
const _response = await client.deletePlaylist({ id: parseInt(params.id) });
}
} satisfies Actions;