mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-05-07 22:19:31 -05:00
should be able to add a track to a playlist now
also moar haptic feedback all around
This commit is contained in:
@@ -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!)
|
||||
|
||||
Reference in New Issue
Block a user