mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
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:
@@ -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({
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user