should be able to add a track to a playlist now

also moar haptic feedback all around
This commit is contained in:
Violet Caulfield
2025-02-05 18:57:57 -06:00
parent c7a5f4c7d8
commit abb61a42a4
6 changed files with 91 additions and 18 deletions
+10 -1
View File
@@ -1,7 +1,16 @@
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
import Client from "../../../api/client";
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api";
export async function addToPlaylist(track: BaseItemDto, playlist: BaseItemDto) {
return getPlaylistsApi(Client.api!)
.addItemToPlaylist({
ids: [
track.Id!
],
playlistId: playlist.Id!
})
}
export async function reorderPlaylist(playlistId: string, itemId: string, to: number) {
return getPlaylistsApi(Client.api!)