feat(playlist): support updating playlist track order (#1875)

* feat(playlist): support updating playlist track order

* force track mode when editing

* use common confirmation for save

* remove en editPLaylist key
This commit is contained in:
Kendall Garner
2026-03-28 04:36:08 +00:00
committed by GitHub
parent 86e6b88555
commit 68e6e3cf65
12 changed files with 150 additions and 160 deletions
+2 -7
View File
@@ -683,14 +683,9 @@ const createPlaylist = z.object({
const updatePlaylist = z.null();
const updatePlaylistParameters = z.object({
Genres: z.array(genreItem),
Ids: z.string().array().optional(),
IsPublic: z.boolean().optional(),
MediaType: z.literal('Audio'),
Name: z.string(),
PremiereDate: z.null(),
ProviderIds: z.object({}),
Tags: z.array(genericItem),
UserId: z.string(),
Name: z.string().optional(),
});
const addToPlaylist = z.object({
+1 -1
View File
@@ -467,7 +467,7 @@ const deletePlaylistParameters = z.object({
});
const createPlaylistParameters = z.object({
name: z.string(),
name: z.string().optional(),
playlistId: z.string().optional(),
songId: z.array(z.string()).optional(),
});
+13 -1
View File
@@ -1084,7 +1084,6 @@ export type UpdatePlaylistArgs = BaseEndpointArgs & {
export type UpdatePlaylistBody = {
_custom?: Record<string, any>;
comment?: string;
genres?: Genre[];
name: string;
ownerId?: string;
public?: boolean;
@@ -1430,6 +1429,7 @@ export type ControllerEndpoint = {
savePlayQueue: (args: SaveQueueArgs) => Promise<void>;
scrobble: (args: ScrobbleArgs) => Promise<ScrobbleResponse>;
search: (args: SearchArgs) => Promise<SearchResponse>;
setPlaylistSongs: (args: SetPlaylistSongsArgs) => Promise<SetPlaylistSongsResponse>;
setRating?: (args: SetRatingArgs) => Promise<RatingResponse>;
shareItem?: (args: ShareItemArgs) => Promise<ShareItemResponse>;
updateInternetRadioStation: (
@@ -1581,6 +1581,9 @@ export type InternalControllerEndpoint = {
savePlayQueue: (args: ReplaceApiClientProps<SaveQueueArgs>) => Promise<void>;
scrobble: (args: ReplaceApiClientProps<ScrobbleArgs>) => Promise<ScrobbleResponse>;
search: (args: ReplaceApiClientProps<SearchArgs>) => Promise<SearchResponse>;
setPlaylistSongs: (
args: ReplaceApiClientProps<SetPlaylistSongsArgs>,
) => Promise<SetPlaylistSongsResponse>;
setRating?: (args: ReplaceApiClientProps<SetRatingArgs>) => Promise<RatingResponse>;
shareItem?: (args: ReplaceApiClientProps<ShareItemArgs>) => Promise<ShareItemResponse>;
updateInternetRadioStation: (
@@ -1637,6 +1640,15 @@ export type ServerInfo = {
export type ServerInfoArgs = BaseEndpointArgs;
export type SetPlaylistSongsArgs = BaseEndpointArgs & { body: SetPlaylistSongsQuery };
export type SetPlaylistSongsQuery = {
id: string;
songIds: string[];
};
export type SetPlaylistSongsResponse = null;
export type SimilarSongsArgs = BaseEndpointArgs & {
query: SimilarSongsQuery;
};